Commit Graph

196 Commits

Author SHA1 Message Date
John Sully
e5565a793e Add support for incremental build with header files 2020-01-01 10:33:02 -05:00
Salvatore Sanfilippo
f4b8197060
Merge pull request #6052 from jtru/better-systemd-integration-v2
Better systemd integration v2
2019-12-19 08:54:22 +01:00
antirez
f5d48537f1 Fix Pi build needing -latomic. Issue #6275. 2019-11-29 17:35:59 +01:00
Johannes Truschnigg
129d14e143 Auto-detect and link libsystemd at compile-time
This adds Makefile/build-system support for USE_SYSTEMD=(yes|no|*). This
variable's value determines whether or not libsystemd will be linked at
build-time.

If USE_SYSTEMD is set to "yes", make will use PKG_CONFIG to check for
libsystemd's presence, and fail the build early if it isn't
installed/detected properly.

If USE_SYSTEM is set to "no", libsystemd will *not* be linked, even if
support for it is available on the system redis is being built on.

For any other value that USE_SYSTEM might assume (e.g. "auto"),
PKG_CONFIG will try to determine libsystemd's presence, and set up the
build process to link against it, if it was indicated as being
installed/available.

This approach has a number of repercussions of its own, most importantly
the following: If you build redis on a system that actually has systemd
support, but no libsystemd-dev package(s) installed, you'll end up
*without* support for systemd notification/status reporting support in
redis-server. This changes established runtime behaviour.

I'm not sure if the build system and/or the server binary should
indicate this. I'm also wondering if not actually having
systemd-notify-support, but requesting it via the server's config,
should result in a fatal error now.
2019-11-19 18:55:44 +02:00
Yossi Gottlieb
8e29b0b22b Fix Makefile merge issue. 2019-10-16 17:31:02 +03:00
Yossi Gottlieb
0db3b0a0ff Merge remote-tracking branch 'upstream/unstable' into tls 2019-10-16 17:08:07 +03:00
Yossi Gottlieb
61733ded14 TLS: Configuration options.
Add configuration options for TLS protocol versions, ciphers/cipher
suites selection, etc.
2019-10-07 21:07:27 +03:00
Yossi Gottlieb
b087dd1db6 TLS: Connections refactoring and TLS support.
* Introduce a connection abstraction layer for all socket operations and
integrate it across the code base.
* Provide an optional TLS connections implementation based on OpenSSL.
* Pull a newer version of hiredis with TLS support.
* Tests, redis-cli updates for TLS support.
2019-10-07 21:06:13 +03:00
antirez
9073d56eec LOLWUT: refactoring + skeleton of LOLWUT 6. 2019-10-04 19:19:48 +02:00
antirez
9d2ecf6be3 ACL: add slightly modified version of sha256.c for password hashing.
memory.h include removed, types substituted with stdint types.
2019-09-12 12:21:37 +02:00
Guy Korland
2d07883cab
fix build tracking.c should be tracking.o
thanks to @rafie
2019-07-07 18:28:15 +03:00
antirez
a28d7918d7 Client side caching: add new file and description. 2019-06-29 09:09:38 -04:00
zhaozhao.zz
340a723b87 Makefile: 1TD -> STD 2019-05-07 13:35:27 +08:00
Ubuntu
9bf7f302a7 Threaded IO: stop threads when no longer needed + C11 in Makefile.
Now threads are stopped even when the connections drop immediately to
zero, not allowing the networking code to detect the condition and stop
the threads. serverCron() will handle that.
2019-05-06 18:02:51 +02:00
Brad Solomon
d5b24d31d7 Provide an uninstall target in Makefile
On `make uninstall`, removes:

- /usr/local/bin/redis-benchmark
- /usr/local/bin/redis-check-aof
- /usr/local/bin/redis-check-rdb
- /usr/local/bin/redis-cli
- /usr/local/bin/redis-sentinel
- /usr/local/bin/redis-server

(Only the src/ versions are removed in `make clean`)
2019-03-06 21:24:45 -05:00
artix
4e78d5cd40 Redis Benchmark: update slots configuration after MOVED/ASK reply 2019-03-01 17:53:14 +01:00
antirez
e00b22e090 Gopher: initial request handling. 2019-02-21 23:13:08 +01:00
antirez
b43d70df56 ACL: refactoring of the original authentication code. 2019-01-09 17:00:30 +01:00
David Carlier
ac086b1932 OpenBSD support.
Special treatment here as backtrace support is optional,
cannot be found via pkg-config and similar neither.
2018-11-25 08:10:26 +00:00
David Carlier
69ca907868 Backtrace/register dump on BSD.
FreeBSD/DragonFlyBSD does have backtrace only it does not
belong to libc.
2018-11-25 07:21:56 +00:00
David Carlier
4e0af5efd4 DragonFlyBSD little build fix 2018-11-11 18:49:55 +00:00
David Carlier
1d98666327 only FreeBSD change/little warning addressing 2018-11-08 10:13:52 +00:00
David Carlier
cf2f5e19d9 tweak form feedback 2018-10-31 09:53:07 +00:00
David Carlier
a21d1522c7 allow flavors 2018-10-30 14:38:05 +00:00
David Carlier
6534b3e09e Fix clang build.
Some math functions require c11 standard.
2018-10-30 13:23:43 +00:00
antirez
f30b18f4de Fix again stack generation on the Raspberry Pi.
The fix was removed by c8ca71d40 attempting to fix the stack generation
on ARM64, without testing if it would still work on ARM32.
Now it should work both sides.
2018-10-19 10:39:57 +02:00
antirez
c560ade831 LOLWUT: split the command from version-specific implementations. 2018-09-14 12:35:59 +02:00
antirez
43385c4375 LOLWUT: wrap it into a proper command. 2018-09-12 11:34:10 +02:00
antirez
cb78c84235 Use nolocks_localtime() for safer logging. 2018-07-04 16:50:22 +02:00
zhaozhao.zz
2711f053f2 append -lrt to FINAL_LIBS for linux 2018-05-25 20:16:57 +08:00
antirez
e4f5c04930 Don't append libjemalloc.a otherwise it will be after -ldl. 2018-05-25 13:36:51 +02:00
Salvatore Sanfilippo
b23a501135
Merge pull request #4099 from JunHe77/aarch64_stack_cflag
Fixed stack trace generation on aarch64
2018-05-24 16:16:12 +02:00
artix
1f548359cb Cluster Manager: import command 2018-04-23 16:28:48 +02:00
artix
486c7af7b8 Cluster Manager: 'create', 'info' and 'check' commands 2018-04-23 16:28:47 +02:00
charsyam
c76f890209 fix listpack.c to listpack.o in Makefile 2018-03-15 20:32:08 +09:00
antirez
79866a6361 Streams: 12 commits squashed into the initial Streams implementation. 2017-12-01 10:24:24 +01:00
antirez
fc7ecd8d35 AOF check utility: ability to check files with RDB preamble. 2017-07-10 13:38:23 +02:00
spinlock
10db81af71 update Makefile for test-sds 2017-07-05 14:32:09 +00:00
Jun He
c8ca71d40b Fixed stack trace generation on aarch64
Change-Id: I9801239c98cb7362ed07e8b9ec2ba7e45749dba7
Signed-off-by: Jun He <jun.he@arm.com>
2017-07-03 08:47:55 +00:00
antirez
c3998728a2 ARM: Fix stack trace generation on crash. 2017-06-26 10:36:16 +02:00
antirez
1f598fc2bb Modules TSC: use atomic var for server.unixtime.
This avoids Helgrind complaining, but we are actually not using
atomicGet() to get the unixtime value for now: too many places where it
is used and given tha time_t is word-sized it should be safe in all the
archs we support as it is.

On the other hand, Helgrind, when Redis is compiled with "make helgrind"
in order to force the __sync macros, will detect the write in
updateCachedTime() as a read (because atomic functions are used) and
will not complain about races.

This commit also includes minor refactoring of mutex initializations and
a "helgrind" target in the Makefile.
2017-05-10 10:04:16 +02:00
Jan-Erik Rediger
c4ad4765b0 Reorder to make dict-benchmark compile on Linux
Fixes #3944
2017-04-17 13:37:59 +02:00
antirez
1409c545da Cluster: hash slots tracking using a radix tree. 2017-03-27 16:37:22 +02:00
Salvatore Sanfilippo
9cc83d2ad9 Makefile: fix building with Solaris C compiler, 64 bit. 2017-02-23 16:53:39 +01:00
antirez
06263485d4 Merge branch 'siphash' into unstable 2017-02-21 17:10:10 +01:00
antirez
84fa8230e5 Use locale agnostic tolower() in dict.c hash function. 2017-02-20 17:39:44 +01:00
antirez
adeed29a99 Use SipHash hash function to mitigate HashDos attempts.
This change attempts to switch to an hash function which mitigates
the effects of the HashDoS attack (denial of service attack trying
to force data structures to worst case behavior) while at the same time
providing Redis with an hash function that does not expect the input
data to be word aligned, a condition no longer true now that sds.c
strings have a varialbe length header.

Note that it is possible sometimes that even using an hash function
for which collisions cannot be generated without knowing the seed,
special implementation details or the exposure of the seed in an
indirect way (for example the ability to add elements to a Set and
check the return in which Redis returns them with SMEMBERS) may
make the attacker's life simpler in the process of trying to guess
the correct seed, however the next step would be to switch to a
log(N) data structure when too many items in a single bucket are
detected: this seems like an overkill in the case of Redis.

SPEED REGRESION TESTS:

In order to verify that switching from MurmurHash to SipHash had
no impact on speed, a set of benchmarks involving fast insertion
of 5 million of keys were performed.

The result shows Redis with SipHash in high pipelining conditions
to be about 4% slower compared to using the previous hash function.
However this could partially be related to the fact that the current
implementation does not attempt to hash whole words at a time but
reads single bytes, in order to have an output which is endian-netural
and at the same time working on systems where unaligned memory accesses
are a problem.

Further X86 specific optimizations should be tested, the function
may easily get at the same level of MurMurHash2 if a few optimizations
are performed.
2017-02-20 17:29:17 +01:00
Salvatore Sanfilippo
4e9cf4cc7e ARM: Use libc malloc by default.
I'm not sure how much test Jemalloc gets on ARM, moreover
compiling Redis with Jemalloc support in not very powerful
devices, like most ARMs people will build Redis on, is extremely
slow. It is possible to enable Jemalloc build anyway if needed
by using "make MALLOC=jemalloc".
2017-02-19 15:02:37 +00:00
Salvatore Sanfilippo
72d6d64771 ARM: Avoid memcpy() in MurmurHash64A() if we are using 64 bit ARM.
However note that in architectures supporting 64 bit unaligned
accesses memcpy(...,...,8) is likely translated to a simple
word memory movement anyway.
2017-02-19 15:00:46 +00:00
oranagra
7aa9e6d2ae active memory defragmentation 2016-12-30 03:37:52 +02:00