Skip to content

Config nondeterministic lua #483

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 203 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
203 commits
Select commit Hold shift + click to select a range
571e257
Redis 2.6 branch obtained from unstable removing all the cluster rela…
antirez Mar 10, 2012
00b3336
Build dependencies updated.
antirez Mar 10, 2012
7551f2a
Version is now 2.5.1, first unstable release of Redis 2.6
antirez Mar 10, 2012
37180ed
RDB version is no 4, because small hashes are now encoded as ziplists…
antirez Mar 10, 2012
b014c1f
RDB4 support in redis-check-dump.
antirez Mar 10, 2012
dfc2545
fix typo of redis.conf
Mar 10, 2012
ee61a4b
RDB hashes loading fixed removing the assertion that failed every tim…
antirez Mar 13, 2012
a74ab64
RDB hashes loading, fixed another bug in the loading of HT-encoded ha…
antirez Mar 13, 2012
56de496
c->bufpos initialization moved for aesthetics.
antirez Mar 13, 2012
41e8e5c
Client creation time in redisClient structure. New age field in CLIEN…
antirez Mar 13, 2012
57a5e54
Added a qbuf-free field to CLIENT LIST output.
antirez Mar 13, 2012
cfa4b57
Process async client checks like client timeouts and BLPOP timeouts i…
antirez Mar 13, 2012
3e8fcb6
CLIENT LIST test modified to reflect the new output.
antirez Mar 13, 2012
5e473cd
Call all the helper functions needed by clientsCron() as clientsCronS…
antirez Mar 14, 2012
f9322fb
sds.c new function sdsRemoveFreeSpace().
antirez Mar 14, 2012
6934832
sds.c: sdsAllocSize() function added.
antirez Mar 14, 2012
9fa9ccb
Reclaim space from the client querybuf if needed.
antirez Mar 14, 2012
749817b
Version bumped to 2.5.2
antirez Mar 14, 2012
f1eaf57
Fix for issue #391.
antirez Mar 15, 2012
78d6a02
First implementation of --test-memory. Still a work in progress.
antirez Mar 16, 2012
f4df22d
Hem... actual memtest.c file added.
antirez Mar 16, 2012
d605fda
Memory test function now less boring thanks to screen-wide progress bar.
antirez Mar 16, 2012
d4e6ce3
On crash suggest to give --test-memory a try.
antirez Mar 18, 2012
32f62ed
Number of iteration of --test-memory is now 300 (several minutes per …
antirez Mar 18, 2012
74760d3
Fixed typo.
antirez Mar 18, 2012
ea693f0
More memory tests implemented. Default number of iterations lowered t…
antirez Mar 18, 2012
a7ef5ce
Memory addressing test implemented.
antirez Mar 19, 2012
6e6bbac
Read-only flag removed from PUBLISH command.
antirez Mar 19, 2012
24b0942
Suppress warnings compiling redis-cli with certain gcc versions.
antirez Mar 19, 2012
f597910
Merge remote-tracking branch 'origin/2.6' into 2.6
antirez Mar 19, 2012
518e720
Fixed typo in 2.6 release notes.
antirez Mar 19, 2012
0380c13
redis_init_script template updated.
antirez Mar 20, 2012
7c1cec2
Redis cluster stuff removed from 2.6 redis.conf file.
antirez Mar 20, 2012
0540616
Support for read-only slaves. Semantical fixes.
antirez Mar 20, 2012
38bb452
DEBUG should not be flagged as w otherwise we can not call DEBUG DIGE…
antirez Mar 20, 2012
3f7ad83
Correctly create shared.oomerr as an sds string.
antirez Mar 21, 2012
9aba884
Comments about security of slave-read-only in redis.coinf.
antirez Mar 21, 2012
7b22c44
Result of INCRBYFLOAT and HINCRBYFLOAT should never be in exponential…
antirez Mar 22, 2012
b54cdfb
Code style hack.
antirez Mar 22, 2012
5219255
Replicate HINCRBYFLOAT as HSET.
antirez Mar 23, 2012
b64281c
Big endian fix. The bug was introduced because of a typo.
antirez Mar 23, 2012
ab06038
RDB load of different encodings test added.
antirez Mar 23, 2012
2d04eef
Contextualize comment.
antirez Mar 23, 2012
9b962d1
Fixed memory leak in hash loading.
antirez Mar 23, 2012
27688de
RDB load of different encodings test added.
antirez Mar 23, 2012
925927f
Merge remote-tracking branch 'origin/2.6' into 2.6
antirez Mar 23, 2012
9542d9d
convert-zipmap-hash-on-load test enabled
antirez Mar 24, 2012
188a17e
Add used allocator in redis-server -v output.
antirez Mar 24, 2012
29e1976
When running the test in valgrind mode, pass the right flags to show …
antirez Mar 24, 2012
0387e9c
convert-zipmap-hash-on-load false positive fixed.
antirez Mar 25, 2012
754643c
Version is now 2.5.3.
antirez Mar 25, 2012
81f32c7
New INFO field aof_delayed_fsync introduced.
antirez Mar 25, 2012
d0407c2
CONFIG RESETSTAT resets two more fields.
antirez Mar 25, 2012
9ea95e6
SIGSEGV handler refactored so that we can reuse stack trace and curre…
antirez Mar 27, 2012
efd412f
remove disk-store related comments
anydot Mar 27, 2012
38d6976
declare hashDictType as external too
anydot Mar 27, 2012
56ff70f
use server.unixtime instead of time(NULL) where possible (cluster.c n…
anydot Mar 27, 2012
92dd4e4
fix time() instead of mstime() in expireIfNeeded
anydot Mar 27, 2012
085aaef
fix typo
huangzworks Mar 15, 2012
fc030ac
Redis software watchdog.
antirez Mar 27, 2012
1507be5
Correctly set the SIGARLM timer for the software watchdog.
antirez Mar 27, 2012
e4cd583
Mask SIGALRM everything but in the main thread.
antirez Mar 27, 2012
59d884a
Produce the watchlog warning log in a way that is safer from a signal…
antirez Mar 27, 2012
dd896e1
define zlibc_free() in a way that is not shadowed by jemalloc.
antirez Mar 27, 2012
f3e159b
Redis test: regexp to check if valgrind reported errors modified. Now…
antirez Mar 28, 2012
be4f8cc
Log from signal handlers is now safer.
antirez Mar 28, 2012
e51f7d2
Fixes for redisLogFromHandler().
antirez Mar 28, 2012
2f2e6ad
added redis.sha1hex(string) as lua scripting function.
fritzy Mar 28, 2012
ee704a0
Test for redis.sha1hex().
antirez Mar 28, 2012
ed4d4f1
Fix for slaves chains. Force resync of slaves (simply disconnecting t…
antirez Mar 29, 2012
f1e38b3
Fixed typo in comment: "te" -> "the".
antirez Mar 29, 2012
0f51e3c
Regression test for issue 417 (memory leak when replicating to DB wit…
antirez Mar 30, 2012
ae15f75
Fixed a memory leak with replication
josephjang Mar 29, 2012
88bd32f
Purely aesthetic code change.
antirez Mar 30, 2012
4ccf671
Better syncio.c with millisecond resolution.
antirez Mar 31, 2012
fa34ba3
syncio.c calls in replication.c fixed for the new millisecond timeout…
antirez Mar 31, 2012
f08aa2b
Fixed a typo in install_server.sh
ThePicard Apr 1, 2012
11dae17
Write RDB magic using a REDIS_RDB_VERSION define that is defined insi…
antirez Mar 31, 2012
179ee2d
CRC64 implementation added to Redis code base.
antirez Apr 2, 2012
bff31e1
New verions of DUMP, RESTORE, MIGRATE back ported from unstable to 2.6
antirez Apr 2, 2012
8cf8974
DUMP, RESTORE, MIGRATE tests.
antirez Apr 2, 2012
285df7b
Version bumped 2.4.5
antirez Apr 2, 2012
37cc07d
MIGRATE now let the client distinguish I/O errors and timeouts from o…
antirez Apr 2, 2012
b739506
MIGRATE test modified because the implementation changed.
antirez Apr 2, 2012
31e2156
redis-trib.rb removed from 2.6 branch.
antirez Apr 3, 2012
fbce475
When the user-provided 'maxclients' value is too big for the max numb…
antirez Apr 3, 2012
bde80cb
Two fixed for MIGRATE: fix TTL propagation and fix transferring of da…
antirez Apr 3, 2012
fb8409a
Another fix for MIGRATE.
antirez Apr 3, 2012
e3fd3cc
More MIGRATE tests.
antirez Apr 3, 2012
3c413d5
redis-cli help.h updated. Script to generate it updated as well.
antirez Apr 3, 2012
df35d87
Print milliseconds of the current second in log lines timestamps. Som…
antirez Apr 4, 2012
a5b75e9
SLAVEOF is not a write command.
antirez Apr 4, 2012
fa2a27c
New "os" field in INFO output providing information about the operati…
antirez Apr 4, 2012
09eb448
Structure field controlling the INFO field master_link_down_since_sec…
antirez Apr 4, 2012
6c52d5c
remove mentions of VM in comments
anydot Apr 2, 2012
4d57e44
new option for choosing number of test clients to run
anydot Apr 3, 2012
b811b33
in kill_server send the signal once, then wait for up to 5sec before …
anydot Apr 3, 2012
c9adc81
allocate alternate signal stack, change of sigaction flags for sigterm
anydot Apr 3, 2012
c537980
On slow computers, 10 seconds are not enough for this heavy replicati…
antirez Apr 4, 2012
937abeb
future-proof version comparison
anydot Apr 5, 2012
9f89944
add support for generation of lcov coverage reports
anydot Apr 4, 2012
b518a83
fix mstime() ommited while comparing if key is already expired
anydot Mar 28, 2012
81a28fe
for (p)expireat use absolute time, without double recomputation
anydot Mar 28, 2012
3aad0de
expireGenericCommand(): better variable names and a top-comment that …
antirez Apr 5, 2012
a3ec16f
implement aeWait using poll(2). Fixes issue #267.
jokea Jan 6, 2012
8382453
version bumped to 2.5.5
antirez Apr 6, 2012
8d3f5ce
New INFO field in persistence section: bgrewriteaof_scheduled.
antirez Apr 6, 2012
3984108
redis.tcl: no longer leave unread replies if an error happens during …
antirez Apr 6, 2012
eb6bc2e
Two new tests for BGREWRTIEAOF.
antirez Apr 6, 2012
7dc1d2b
Removed dead code: function rdbSaveTime() is no longer used since RDB…
antirez Apr 7, 2012
4f0bd60
Never used function stringObjectEqualsMs() removed.
antirez Apr 7, 2012
b162e6f
New client info field added to CLIENT LIST output: multi, containing …
antirez Apr 7, 2012
2cf3f07
Tests for MONITOR.
antirez Apr 7, 2012
55951f9
For coverage testing use exit() instead of _exit() when termiating sa…
antirez Apr 7, 2012
08211b2
Added new test to check that "CONFIG appendonly no" actually kills th…
antirez Apr 7, 2012
9ba4d5a
rio.c file somewhat documented so that the casual reader can understa…
antirez Apr 9, 2012
bb99f42
crc64.c modified for incremental computation.
antirez Apr 9, 2012
b4b923b
Add checksum computation to rio.c
antirez Apr 9, 2012
1bcb45d
Fixed compilation of new rio.c changes (typos and so forth.)
antirez Apr 9, 2012
7f4f86f
RDB files now embed a crc64 checksum. Version of RDB bumped to 5.
antirez Apr 9, 2012
39d1e35
It is now possible to enable/disable RDB checksum computation from re…
antirez Apr 10, 2012
e957403
dump/restore fixed to use the new crc64 API.
antirez Apr 9, 2012
fdf8bd4
Test for maxclients.
antirez Apr 8, 2012
3f64694
Version 2.5.6.
antirez Apr 10, 2012
b9aa332
Check write(2) return value to avoid warnings, because in this contex…
antirez Apr 10, 2012
3ba5eab
Minor MIGRATE implementation simplification about ttl handling.
antirez Apr 10, 2012
e74bec5
Everything x86 is little endian
pietern Mar 25, 2012
de07849
Clean up Makefiles
pietern Mar 25, 2012
ef278d1
Macros ULONG_ONEZERO / ULONG_ZEROONE were inverted in #ifdef to test …
antirez Apr 11, 2012
336ba6a
Make inline functions rioRead/Write/Tell static. This fixes issue #447.
antirez Apr 11, 2012
d5ec389
make dep: redirect output to Makefile.dep.
antirez Apr 11, 2012
79e3df9
Makefile.dep updated.
antirez Apr 11, 2012
b9cd703
added explanation for the magic 511 backlog number
erikdubbelboer Apr 11, 2012
69ac4d0
Makefile now introduces Redis-specific CFLAGS / LDFLAGS. Gcov target …
antirez Apr 12, 2012
50fb330
Make gcov fixed.
antirez Apr 12, 2012
2065682
memtest.c: integer overflow fixed.
antirez Apr 12, 2012
d298825
Print arch bits with redis-server -v
antirez Apr 12, 2012
236adc2
A few var names fixed in Makefile.
antirez Apr 13, 2012
430602b
Protect globals access in Lua scripting.
antirez Mar 29, 2012
3e6a446
Scripting: globals protection can now be switched on/off.
antirez Apr 13, 2012
e387dc5
Tests for lua globals protection.
antirez Apr 13, 2012
6255a5a
Globals protection global() function modified for speed and correctness.
antirez Apr 13, 2012
97cab30
Stop access to global vars. Not configurable.
antirez Apr 13, 2012
d290689
mt.declared is no longer needed.
antirez Apr 13, 2012
d63a171
Tests modified to match the new global protection implementation.
antirez Apr 13, 2012
c9853f5
Use Lua tostring() before concatenation.
antirez Apr 13, 2012
9a2dd1e
EVAL errors are more clear now.
antirez Apr 13, 2012
59333ff
New test for scripting engine: DECR_IF_GT.
antirez Apr 13, 2012
6cedb4d
Rename ADD_*FLAGS -> REDIS_*FLAGS, REDIS_*FLAGS -> FINAL_*FLAGS
pietern Apr 14, 2012
0b27a55
The lcov target shouldn't clean
pietern Apr 14, 2012
cb481f4
Ignore gcov/lcov artifacts
pietern Apr 14, 2012
95bc195
Question mark assignment is not needed
pietern Apr 14, 2012
61e8825
First set defaults, then do composition
pietern Apr 14, 2012
3126e08
Remove unused LIBS variable
pietern Apr 14, 2012
8642295
Don't set flags recursively
pietern Apr 14, 2012
d0cd262
Persist `make` settings and trigger rebuild if anything changes
pietern Apr 14, 2012
96aeca4
Less false positives in maxclients test, hopefully.
antirez Apr 17, 2012
68ee185
lookupKeyByPattern() used by SORT GET/BY rewritten. Fixes issue #460.
antirez Apr 17, 2012
a1090c1
Added test for SORT corner case: pattern ending with just "->".
antirez Apr 17, 2012
727d6dd
Two small fixes to maxclients handling.
antirez Apr 18, 2012
212bb9c
More robust maxclients test.
antirez Apr 18, 2012
ae55245
Marginally cleaner lookupKeyByPattern() implementation.
antirez Apr 18, 2012
d00f514
Merge pull request #455 from pietern/2.6-mkopts
antirez Apr 18, 2012
8d12645
Test LINDEX out of range index.
antirez Apr 18, 2012
a00fcaa
Test LINSERT syntax error.
antirez Apr 18, 2012
bec200e
Explicit RPOP/LPOP tests.
antirez Apr 18, 2012
60ef787
Document mostly dead code in RPOPLPUSH implementation.
antirez Apr 18, 2012
24982f2
New hash fuzzing test.
antirez Apr 18, 2012
ff5e31f
Added an SMOVE test where src and dest key are the same.
antirez Apr 18, 2012
eb624e3
Test SINTER with non existing key.
antirez Apr 18, 2012
7a2065e
Test SINTER against same integer elements, but different set encoding.
antirez Apr 18, 2012
5c45ae1
Test SDIFF with first set empty.
antirez Apr 18, 2012
e107685
redis-cli --bigkeys
antirez Apr 18, 2012
0122cc4
redis-cli --bigkeys output modified to be simpler to read..
antirez Apr 18, 2012
1d82bbd
cr16.c removed from 2.6 branch, was not used.
antirez Apr 18, 2012
c331276
Tests for scripting PRNG.
antirez Apr 18, 2012
d54943b
Currenly not used code in dict.c commented out.
antirez Apr 18, 2012
ca577d1
SHUTDOWN NOSAVE now can stop a non returning script. Issue #466.
antirez Apr 19, 2012
abfd08f
New tests related to scripts max execution time.
antirez Apr 19, 2012
30e8941
README now makes clear that our support for solaris derived systems i…
antirez Apr 21, 2012
c11a01a
redis.conf AOF section comments improved.
antirez Apr 19, 2012
590d55a
Limit memory used by big SLOWLOG entries.
antirez Apr 21, 2012
e337b26
Even inside #if 0 comments are comments.
antirez Apr 21, 2012
7d6bf79
Replace unnecessary calls to echo and cat
schlenk Apr 17, 2012
537dafa
Remove loadfile() access from the scripting engine.
antirez Apr 23, 2012
0a8a1e7
New time limit for protocol desync test set to 30 seconds to reduce f…
antirez Apr 23, 2012
69b30cf
Ziplist encoding now tested with negative integers as well.
antirez Apr 23, 2012
38b60de
Fix and refactoring of code used to get registers on crash.
antirez Apr 24, 2012
9de5d46
A few compiler warnings suppressed.
antirez Apr 24, 2012
ad91404
Add a 24bit integer to ziplists to save one byte for ints that can
grisha Apr 20, 2012
dd51571
ziplist.c: added comments about the new 24 bit encoding.
antirez Apr 24, 2012
62bfa66
rdbLoad() should check REDIS_RDB_VERSION instead of hardcoded number.
antirez Apr 24, 2012
dcd4efe
Added two new encodings to ziplist.c
antirez Apr 24, 2012
717145c
Spurious debugging printf removed.
antirez Apr 24, 2012
12a042f
redis-check-dump now is RDB version 6 ready.
antirez Apr 24, 2012
c16bf71
Explicitly use bash for install_server.sh. Fixes issue #397
antirez Apr 24, 2012
cf56312
patched redis to make non-deterministic command execution in LUA scri…
bbarkerfloss Apr 26, 2012
563405e
first try at time decay LUA script
bbarkerfloss Apr 26, 2012
c80f08c
rename script
bbarkerfloss Apr 26, 2012
97d45fb
added another version that sets expirations on the last modified key …
bbarkerfloss Apr 26, 2012
ead2838
i like this one better
bbarkerfloss Apr 26, 2012
a54f48f
update default configs
Apr 27, 2012
13572b2
add lua_nondeterministic_calls to be printed out on INFO command so w…
bbarkerfloss May 2, 2012
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 00-RELEASENOTES
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ UPGRADE URGENCY: We suggest new users to start with 2.6.0, and old users to
in slaves.
* Milliseconds resolution expires, also added new commands with milliseconds
precision (PEXPIRE, PTTL, ...).
* Clinets max output buffer soft and hard limits. You can specifiy different
* Clients max output buffer soft and hard limits. You can specifiy different
limits for different classes of clients (normal,pubsub,slave).
* AOF is now able to rewrite aggregate data types using variadic commands,
often producing an AOF that is faster to save, load, and is smaller in size.
Expand Down
7 changes: 7 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ documentation at http://redis.io
Building Redis
--------------

Redis can be compiled and used on Linux, OSX, OpenBSD, NetBSD, FreeBSD.
We support big endian and little endian architectures.

It may compile on Solaris derived systems (for instance SmartOS) but our
support for this platform is "best effort" and Redis is not guaranteed to
work as well as in Linux, OSX, and *BSD there.

It is as simple as:

% make
Expand Down
85 changes: 52 additions & 33 deletions deps/Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
# Redis dependency Makefile

UNAME_S:=$(shell sh -c 'uname -s 2> /dev/null || echo not')

LUA_CFLAGS=-O2 -Wall $(ARCH)
ifeq ($(UNAME_S),SunOS)
# Make isinf() available
LUA_CFLAGS+= -D__C99FEATURES__=1
endif

JEMALLOC_CFLAGS=
ifeq ($(ARCH),-m32)
JEMALLOC_CFLAGS+=CFLAGS="-std=gnu99 -Wall -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -m32"
endif
uname_S:= $(shell sh -c 'uname -s 2>/dev/null || echo not')

CCCOLOR="\033[34m"
LINKCOLOR="\033[34;1m"
Expand All @@ -23,37 +12,67 @@ ENDCOLOR="\033[0m"
default:
@echo "Explicit target required"

# Clean everything when ARCH is different
ifneq ($(shell sh -c '[ -f .make-arch ] && cat .make-arch'), $(ARCH))
.make-arch: distclean
else
.make-arch:
.PHONY: default

# Prerequisites target
.make-prerequisites:
@touch $@

# Clean everything when CFLAGS is different
ifneq ($(shell sh -c '[ -f .make-cflags ] && cat .make-cflags || echo none'), $(CFLAGS))
.make-cflags: distclean
-(echo "$(CFLAGS)" > .make-cflags)
.make-prerequisites: .make-cflags
endif

.make-arch:
-(echo $(ARCH) > .make-arch)
# Clean everything when LDFLAGS is different
ifneq ($(shell sh -c '[ -f .make-ldflags ] && cat .make-ldflags || echo none'), $(LDFLAGS))
.make-ldflags: distclean
-(echo "$(LDFLAGS)" > .make-ldflags)
.make-prerequisites: .make-ldflags
endif

distclean:
-(cd hiredis && $(MAKE) clean) > /dev/null || true
-(cd linenoise && $(MAKE) clean) > /dev/null || true
-(cd lua && $(MAKE) clean) > /dev/null || true
-(cd jemalloc && [ -f Makefile ] && $(MAKE) distclean) > /dev/null || true
-(rm -f .make-arch)
-(rm -f .make-*)

.PHONY: distclean

hiredis: .make-prerequisites
@printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR)
cd hiredis && $(MAKE) static

.PHONY: hiredis

linenoise: .make-prerequisites
@printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR)
cd linenoise && $(MAKE)

.PHONY: linenoise

ifeq ($(uname_S),SunOS)
# Make isinf() available
LUA_CFLAGS= -D__C99FEATURES__=1
endif

LUA_CFLAGS+= -O2 -Wall -DLUA_ANSI $(CFLAGS)
LUA_LDFLAGS+= $(LDFLAGS)

hiredis: .make-arch
@printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)hiredis$(ENDCOLOR)
cd hiredis && $(MAKE) static ARCH="$(ARCH)"
lua: .make-prerequisites
@printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR)
cd lua/src && $(MAKE) all CFLAGS="$(LUA_CFLAGS)" MYLDFLAGS="$(LUA_LDFLAGS)"

linenoise: .make-arch
@printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)linenoise$(ENDCOLOR)
cd linenoise && $(MAKE) ARCH="$(ARCH)"
.PHONY: lua

lua: .make-arch
@printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)lua$(ENDCOLOR)
cd lua && $(MAKE) CFLAGS="$(LUA_CFLAGS)" MYLDFLAGS="$(ARCH)" ansi
JEMALLOC_CFLAGS= -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops $(CFLAGS)
JEMALLOC_LDFLAGS= $(LDFLAGS)

jemalloc: .make-arch
@printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)jemalloc$(ENDCOLOR)
cd jemalloc && ./configure $(JEMALLOC_CFLAGS) --with-jemalloc-prefix=je_ --enable-cc-silence && $(MAKE) lib/libjemalloc.a
jemalloc: .make-prerequisites
@printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR)
cd jemalloc && ./configure --with-jemalloc-prefix=je_ --enable-cc-silence CFLAGS="$(JEMALLOC_CFLAGS)" LDFLAGS="$(JEMALLOC_LDFLAGS)"
cd jemalloc && $(MAKE) lib/libjemalloc.a

.PHONY: default conditional_clean hiredis linenoise lua jemalloc
.PHONY: jemalloc
17 changes: 14 additions & 3 deletions deps/linenoise/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
linenoise_example: linenoise.h linenoise.c
STD=
WARN= -Wall
OPT= -Os

R_CFLAGS= $(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS)
R_LDFLAGS= $(LDFLAGS)
DEBUG= -g

R_CC=$(CC) $(R_CFLAGS)
R_LD=$(CC) $(R_LDFLAGS)

linenoise.o: linenoise.h linenoise.c

linenoise_example: linenoise.o example.o
$(CC) $(ARCH) -Wall -W -Os -g -o linenoise_example linenoise.o example.o
$(R_LD) -o $@ $^

.c.o:
$(CC) $(ARCH) -c -Wall -W -Os -g $<
$(R_CC) -c $<

clean:
rm -f linenoise_example *.o
83 changes: 48 additions & 35 deletions redis.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
daemonize no

lua-nondeterministic-calls yes

# When running daemonized, Redis writes a pid file in /var/run/redis.pid by
# default. You can specify a custom pid file location here.
pidfile /var/run/redis.pid
Expand Down Expand Up @@ -114,6 +116,15 @@ stop-writes-on-bgsave-error yes
# the dataset will likely be bigger if you have compressible values or keys.
rdbcompression yes

# Since verison 5 of RDB a CRC64 checksum is placed at the end of the file.
# This makes the format more resistant to corruption but there is a performance
# hit to pay (around 10%) when saving and loading RDB files, so you can disable it
# for maximum performances.
#
# RDB files created with checksum disabled have a checksum of zero that will
# tell the loading code to skip the check.
rdbchecksum yes

# The filename where to dump the DB
dbfilename dump.rdb

Expand Down Expand Up @@ -156,6 +167,22 @@ dir ./
#
slave-serve-stale-data yes

# You can configure a slave instance to accept writes or not. Writing against
# a slave instance may be useful to store some ephemeral data (because data
# written on a slave will be easily deleted after resync with the master) but
# may also cause problems if clients are writing to it because of a
# misconfiguration.
#
# Since Redis 2.6 by default slaves are read-only.
#
# Note: read only slaves are not designed to be exposed to untrusted clients
# on the internet. It's just a protection layer against misuse of the instance.
# Still a read only slave exports by default all the administrative commands
# such as CONFIG, DEBUG, and so forth. To a limited extend you can improve
# security of read only slaves using 'rename-command' to shadow all the
# administrative / dangerous commands.
slave-read-only yes

# Slaves send PINGs to server in a predefined interval. It's possible to change
# this interval with the repl_ping_slave_period option. The default value is 10
# seconds.
Expand Down Expand Up @@ -246,7 +273,7 @@ slave-serve-stale-data yes
# volatile-lru -> remove the key with an expire set using an LRU algorithm
# allkeys-lru -> remove any key accordingly to the LRU algorithm
# volatile-random -> remove a random key with an expire set
# allkeys->random -> remove a random key, any key
# allkeys-random -> remove a random key, any key
# volatile-ttl -> remove the key with the nearest expire time (minor TTL)
# noeviction -> don't expire at all, just return an error on write operations
#
Expand All @@ -273,21 +300,23 @@ slave-serve-stale-data yes

############################## APPEND ONLY MODE ###############################

# By default Redis asynchronously dumps the dataset on disk. If you can live
# with the idea that the latest records will be lost if something like a crash
# happens this is the preferred way to run Redis. If instead you care a lot
# about your data and don't want to that a single record can get lost you should
# enable the append only mode: when this mode is enabled Redis will append
# every write operation received in the file appendonly.aof. This file will
# be read on startup in order to rebuild the full dataset in memory.
# By default Redis asynchronously dumps the dataset on disk. This mode is
# good enough in many applications, but an issue with the Redis process or
# a power outage may result into a few minutes of writes lost (depending on
# the configured save points).
#
# The Append Only File is an alternative persistence mode that provides
# much better durability. For instance using the default data fsync policy
# (see later in the config file) Redis can lose just one second of writes in a
# dramatic event like a server power outage, or a single write if something
# wrong with the Redis process itself happens, but the operating system is
# still running correctly.
#
# Note that you can have both the async dumps and the append only file if you
# like (you have to comment the "save" statements above to disable the dumps).
# Still if append only mode is enabled Redis will load the data from the
# log file at startup ignoring the dump.rdb file.
# AOF and RDB persistence can be enabled at the same time without problems.
# If the AOF is enabled on startup Redis will load the AOF, that is the file
# with the better durability guarantees.
#
# IMPORTANT: Check the BGREWRITEAOF to check how to rewrite the append
# log file in background when it gets too big.
# Please check http://redis.io/topics/persistence for more information.

appendonly no

Expand All @@ -302,7 +331,7 @@ appendonly no
#
# no: don't fsync, just let the OS flush the data when it wants. Faster.
# always: fsync after every write to the append only log . Slow, Safest.
# everysec: fsync only if one second passed since the last fsync. Compromise.
# everysec: fsync only one time every second. Compromise.
#
# The default is "everysec" that's usually the right compromise between
# speed and data safety. It's up to you to understand if you can relax this to
Expand All @@ -312,6 +341,9 @@ appendonly no
# or on the contrary, use "always" that's very slow but a bit safer than
# everysec.
#
# More details please check the following article:
# http://antirez.com/post/redis-persistence-demystified.html
#
# If unsure, use "everysec".

# appendfsync always
Expand Down Expand Up @@ -376,25 +408,6 @@ auto-aof-rewrite-min-size 64mb
# Set it to 0 or a negative value for unlimited execution without warnings.
lua-time-limit 5000

################################ REDIS CLUSTER ###############################
#
# Normal Redis instances can't be part of a Redis Cluster, only nodes that are
# started as cluster nodes can. In order to start a Redis instance as a
# cluster node enable the cluster support uncommenting the following:
#
# cluster-enabled yes

# Every cluster node has a cluster configuration file. This file is not
# intended to be edited by hand. It is created and updated by Redis nodes.
# Every Redis Cluster node requires a different cluster configuration file.
# Make sure that instances running in the same system does not have
# overlapping cluster configuration file names.
#
# cluster-config-file nodes-6379.conf

# In order to setup your cluster make sure to read the documentation
# available at http://redis.io web site.

################################## SLOW LOG ###################################

# The Redis Slow Log is a system to log queries that exceeded a specified
Expand All @@ -417,7 +430,7 @@ slowlog-log-slower-than 10000

# There is no limit to this length. Just be aware that it will consume memory.
# You can reclaim memory used by the slow log with SLOWLOG RESET.
slowlog-max-len 1024
slowlog-max-len 128

############################### ADVANCED CONFIG ###############################

Expand Down
5 changes: 5 additions & 0 deletions src/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.gcda
*.gcno
*.gcov
redis.info
lcov-html
Loading