579 Commits

Author SHA1 Message Date
Salvatore Sanfilippo
95a43c2178 Merge pull request #6615 from soloestoy/wrap-also-propagate-as-multi
Wrap also propagate as multi
2019-12-19 09:24:52 +01:00
Salvatore Sanfilippo
3d344f9467 Merge pull request #6052 from jtru/better-systemd-integration-v2
Better systemd integration v2
2019-12-19 08:54:22 +01:00
antirez
75687fcf17 Avoid changing setKey() API after #6679 fix. 2019-12-18 11:58:02 +01:00
zhaozhao.zz
746c23419f add a new SET option KEEPTTL that doesn't remove expire time 2019-12-18 15:20:36 +08:00
John Sully
643a0e730f Launch the pro binary with --enable-pro
Former-commit-id: ab365ce3da864bbcd0d8a9c77ba55dad365ffdff
2019-12-17 23:52:19 -05:00
John Sully
d50da19fb4 Implement pro badge and trial timeout
Former-commit-id: 9d6a284eb45c8a137c7f59645294b4fa4be389e5
2019-12-17 20:32:53 -05:00
John Sully
5449859ede Perf fixes for expire snapshots
Former-commit-id: da805e4442815c89e85ca7b9fc855dd11ef2a6c8
2019-12-17 17:39:04 -05:00
Salvatore Sanfilippo
8912e70042 Merge pull request #5916 from madolson/dev-unstable-acl-module-pr
Add module APIs for custom authentication
2019-12-17 09:58:26 +01:00
Madelyn Olson
d9c79ff75c Add configuration option for allowing reads on cluster down 2019-12-16 23:33:16 -08:00
Madelyn Olson
f71437d391 Added some documentation and fixed a test 2019-12-17 07:15:04 +00:00
Madelyn Olson
05b7628687 Add module APIs for custom authentication 2019-12-17 06:59:59 +00:00
John Sully
67e429e898 Threading fixes
Former-commit-id: 4f1cec6abd72d6e215880f2ce7812e88509cd218
2019-12-16 22:08:18 -05:00
John Sully
2e05aa89d0 snapshots no longer have dangling keys in the expire set
Former-commit-id: 939b6b61084fbec7b7bd0ada49f6853e334f87dd
2019-12-16 21:14:16 -05:00
John Sully
c4b9d485a1 Expireset should do a deep hash
Former-commit-id: cdcdf57dd1419ec09eab6579caf5e5ff9a5a242c
2019-12-16 19:06:07 -05:00
John Sully
fce67c145f A bunch of bug fixes
Former-commit-id: 228339586a19874f869cf45dc3834a270f99768a
2019-12-10 01:01:45 -05:00
John Sully
38f7cca61a Add support for multiple databases with rocksdb
Former-commit-id: cfa3b760b00776876134692d42e25a60fcd8dea9
2019-12-09 20:45:58 -05:00
Oran Agra
09ec3072cf Add ULL suffix to CLIENT_TRACKING flag to prevent sign extension
the code in:
        c->flags &= ~(CLIENT_TRACKING|CLIENT_TRACKING_BROKEN_REDIR);
will do sign extension and turn on all the high 31 bits
no damage so far since we don't have any yet
2019-12-09 10:03:23 +02:00
John Sully
cb136d2ac5 Flash running well
Former-commit-id: 9cf393eb9fb69bcc7550cd8b83e1568b3f360310
2019-12-08 20:06:22 -05:00
John Sully
992784c21d modify how the database array is stored so swaps are easier
Former-commit-id: 48fd6ec5ca69dd505d0e757862c09a898c19cf22
2019-12-08 16:49:59 -05:00
John Sully
86cd47fe80 Prevent extra copy of key
Former-commit-id: 9c3ef97039e59c6b820f71a90f8a9fb4eae8a7b1
2019-12-08 16:02:24 -05:00
John Sully
1e92c7b117 Optimize remote storage by bulk saving keys after processing operations but before sending responses to clients
Former-commit-id: 63a6dc2a29680d5d3f3f245168ca7de5d6bee1eb
2019-12-08 10:56:05 -05:00
John Sully
130589d8d1 Initial RocksDB integration
Former-commit-id: 0de9e5b692c02e779e538ddd0a56d10215e501bb
2019-12-06 20:39:32 -05:00
John Sully
11f710c5fc Fixup IStorage uses
Former-commit-id: 5ea0ce143a79365fb3903c6fc7caeb1c9760b0cc
2019-12-06 17:43:28 -05:00
John Sully
5fd848eedc Nested snapshot garbage collection. Works but huge fragmentation
Former-commit-id: 82b2a3f3dbf8f864d9157655b5422c69845c4019
2019-11-28 19:00:51 -05:00
Oran Agra
493cc493b6 Converting more configs to use generic infra, and moving defaults to config.c
Changes in behavior:
- Change server.stream_node_max_entries from int64_t to long long, so that it can be used by the generic infra
- standard error reply instead of "repl-backlog-size must be 1 or greater" and such
- tls-port and a few TLS booleans were readable (config get) even when USE_OPENSSL was off (now they aren't)
- syslog-enabled, syslog-ident, cluster-enabled, appendfilename, and supervised didn't have a get (now they do)
- pidfile was initialized to NULL in InitServerConfig but had CONFIG_DEFAULT_PID_FILE in rewriteConfig (so the real default was "", but rewrite would cause it to be set), fixed the rewrite.
- TLS config in server.h was uninitialized (if no tls config args were provided)

Adding test for sanity and coverage
2019-11-28 11:24:57 +02:00
Oran Agra
82e997c043 Additional config.c refactory and bugfixes
- add capability for each config to have a callback to check if value is valid and return error string
  will enable converting many of the remaining custom configs into generic ones (reducing the x4 repetition for set,get,config,rewrite)
- add capability for each config to  to run some update code after config is changed (only for CONFIG SET)
  will also enable converting many of the remaining custom configs into generic ones
- add capability to move default values from server.h and server.c to config.c
  will reduce many excess lines in server.h and server.c (plus, no need to rebuild the entire code base when a default change 8-))

other behavior changes:
- fix bug in bool config get (always returning 'yes')
- fix a bug in modifying jemalloc-bg-thread at runtime (didn't call set_jemalloc_bg_thread, due to bad merge conflict resolution (my fault))
- side effect when a failed attempt to enable activedefrag at runtime, we now respond with -ERR and not with -DISABLED
2019-11-26 16:52:28 +02:00
John Sully
65a3485dfb Ensure size() count is accurate, and fix find_threadsafe which didn't check children
Former-commit-id: ffa44b636afd4fe907c79fe7deebac3d1e091ee9
2019-11-25 17:50:40 -05:00
Salvatore Sanfilippo
d88797da46 Merge pull request #6563 from devnexen/fbsd_build_fix2
Add missing header
2019-11-25 09:45:29 +01:00
John Sully
551b30fb77 Restrict the snapshot API
Former-commit-id: cbafb88f267a9480cdbde6a88e9e1992e8a85971
2019-11-24 17:53:06 -05:00
John Sully
9a75557651 Get rid of key only iterate, the threadsafe is just as fast and key only users can ignore the robj
Former-commit-id: 29689a5ed6141c5b2019d41ccd4036e6ddd1a121
2019-11-24 15:45:17 -05:00
John Sully
da4adb261b Fix multithreading data races
Former-commit-id: 80f6e5818fd575cb08a5f620c35eed1cd862eb57
2019-11-24 13:44:43 -05:00
John Sully
57595d8e47 Add support for nesting snapshots
Former-commit-id: 5e6c37f388233cc3f2d204ad17ac2897d3333a21
2019-11-23 19:02:50 -05:00
John Sully
fda0f82d64 Add support for nested snapshots
Former-commit-id: 43456c7807152062d59b2a90597b6204f637f5cd
2019-11-22 20:53:36 -05:00
zhaozhao.zz
caddddcd8a block: propagate BRPOPLPUSH as RPOPLPUSH when unblock 2019-11-22 16:38:49 +08:00
zhaozhao.zz
b512cb40b8 Propagation: wrap commands in also_propagate array with MULIT/EXEC
Random command like SPOP with count is replicated as
some SREM operations, and store them in also_propagate
array to propagate after the call, but this would break
atomicity.

To keep the command's atomicity, wrap also_propagate
array with MULTI/EXEC.
2019-11-22 15:42:49 +08:00
John Sully
b057c1f8fb Merge branch 'unstable' into advanced_db
Former-commit-id: 00ad497fb3f409dbfcaa62fa9ea5d793263eb13d
2019-11-21 20:21:48 -05:00
John Sully
27c23b0c9b Fix issue #83
Former-commit-id: 3028a890ef11cd99b2c7538de0f480d2466eb150
2019-11-21 20:05:16 -05:00
Salvatore Sanfilippo
22c68cc3bf Merge branch 'unstable' into rm_get_server_info 2019-11-21 10:06:15 +01:00
John Sully
051bde5d3d Fix issue #107, active replicas do their own expires
Former-commit-id: 8e4f323439df29a5e8c0de9db7a848291721fd07
2019-11-20 19:44:31 -05:00
Salvatore Sanfilippo
15664acd87 Merge pull request #6559 from oranagra/active_defrag_tunables
Adjustments for active defrag defaults
2019-11-20 10:08:08 +01:00
John Sully
065ee57c8d Run KEYS async
Former-commit-id: 214a54a815ff66ef4a1526da90296787240ecdf9
2019-11-19 22:12:52 -05:00
John Sully
408a28bd64 Multiple threads should be able to get the same snapshot provided its not too old
Former-commit-id: 054331098ee18dfb1887fd2b0a67688ef894823e
2019-11-19 17:40:35 -05:00
John Sully
80f9b812ca Ensure iterating the keyspace still works during background save
Former-commit-id: 23d7a8a293f253262801bc6ce88ad85e4e38f59a
2019-11-19 15:47:06 -05:00
Johannes Truschnigg
413cb62865 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
Johannes Truschnigg
fb25e68f91 Use libsystemd's sd_notify for communicating redis status to systemd
Instead of replicating a subset of libsystemd's sd_notify(3) internally,
use the dynamic library provided by systemd to communicate with the
service manager.

When systemd supervision was auto-detected or configured, communicate
the actual server status (i.e. "Loading dataset", "Waiting for
master<->replica sync") to systemd, instead of declaring readiness right
after initializing the server process.
2019-11-19 18:55:44 +02:00
Salvatore Sanfilippo
cdae22b9b2 Merge pull request #6557 from oranagra/rm_lru_lfu_revized
rename RN_SetLRUOrLFU -> RM_SetLRU and RN_SetLFU
2019-11-19 11:58:07 +01:00
antirez
0f0e8b10c6 Rename var to fixed_time_expire now that is more general. 2019-11-19 11:28:04 +01:00
John Sully
a60925c949 Final design of forkless background save. expires NYI
Former-commit-id: e2dc24b441bf52b181c820c853e0bc7524254f3f
2019-11-18 19:47:12 -05:00
John Sully
a9f20f0a38 Merge branch 'unstable' into advanced_db
Former-commit-id: 7530d93cd5c4a9fc4e6466abcf96edbdd8daea9e
2019-11-18 15:22:17 -05:00
antirez
d4f31e0d5f Expire cycle: introduce configurable effort. 2019-11-18 11:30:05 +01:00