11367 Commits

Author SHA1 Message Date
antirez
2271cf03f5 Modules: clarify when the disconnection callback is called. 2019-12-05 10:38:18 +01:00
antirez
ecb742acc5 create-cluster script: allow additional options. 2019-12-03 17:52:04 +01:00
antirez
7b5f4b175b Modules: create timers in contexts without a client. 2019-12-03 16:21:23 +01:00
Salvatore Sanfilippo
89849c8b01
Merge pull request #6638 from oranagra/fix_module_short_read_test
fix crash in module short read test
2019-12-02 18:23:28 +01:00
Oran Agra
5661b19005 fix crash in module short read test 2019-12-02 19:17:35 +02:00
antirez
4092a75d85 Avoid collision with MacOS LIST_HEAD macro after #6384. 2019-12-02 09:13:29 +01:00
Salvatore Sanfilippo
e5b5f9a2f6
Merge pull request #6384 from devnexen/apple_smaps_impl
Getting region date per process in Darwin
2019-12-02 09:02:08 +01:00
Salvatore Sanfilippo
ce7ec725e3
Merge pull request #6624 from oranagra/config_c_step_3
Additional config.c refractory and bugfixes
2019-12-02 08:59:36 +01:00
Salvatore Sanfilippo
ff14945e22
Merge pull request #5360 from youjh90/unstable
update leap year comment when div by 400
2019-12-02 08:56:08 +01:00
Salvatore Sanfilippo
731f10225b
Merge pull request #6637 from andygua/add-missed-macro
Added the missed macro definition in slowlog.h
2019-12-02 08:51:05 +01:00
Salvatore Sanfilippo
ddde700b64
Merge pull request #6634 from oranagra/fix_gen_write_load
revert an accidental test code change done as part of the tls project
2019-12-02 08:50:20 +01:00
Andy Guan
1ed5f84a79 Added the missed macro definition in slowlog.h 2019-12-02 00:28:41 -05:00
John Sully
68ab27e758 Fix warning
Former-commit-id: 1d5ae423e039de437e8e48b5d15eb9908846bf04
2019-12-01 20:28:21 -05:00
John Sully
37ff25cecf Fix Issue #107
Former-commit-id: 98a928147ff55a4b7299f9c51637684eed307c41
2019-12-01 18:17:33 -05:00
Oran Agra
07b365b7d7 revert an accidental test code change done as part of the tls project
it seems that commit b087dd1db60ed23d9e59304deb0b1599437f6e23 accidentially changed
gen_write_load to not use deferred client, which causes them to be slower and not
generate high load which they should, making some tests less effecitive
2019-12-01 16:10:09 +02:00
Oran Agra
6b4366b85b config.c post refactory cleanup 2019-12-01 08:19:25 +02:00
John Sully
b27fd8dfb1 Merge branch 'unstable' into advanced_db
Former-commit-id: d1ae8f2d1b03c0a79a36d710e4bb6594c37028b4
2019-11-30 00:52:33 -05:00
John Sully
0860489563 Fix deadlock in spinlock (mfence) also spin for less time before sleeping
Former-commit-id: 8a9045c028128ad1ceaaa7a482ae4d241592d164
2019-11-30 00:51:58 -05:00
John Sully
3c27b9b341 It is permissible to call dictFind() while iterating
Former-commit-id: 43a598c145d5ea9f2c0b2a16f93f5a8cbb724e7e
2019-11-30 00:03:34 -05:00
John Sully
98685a6e95 Reduce snapshot window to 1 second instead of 10
Former-commit-id: 4f91f0503fe4eea1c20b977a5858ac345c3e7b9b
2019-11-29 22:21:49 -05:00
John Sully
995539a7f5 Bug: only update global flags for sync save
Former-commit-id: f01a7cf59bf965b35e5bb23e3ecbb7265ef8942a
2019-11-29 22:21:17 -05:00
John Sully
6cb89c9aee rehash MS does too little work before checking the time
Former-commit-id: 3e57b5c961f7dd91ddb24331eba9a3fa39b08fdd
2019-11-29 15:18:37 -05:00
antirez
f5d48537f1 Fix Pi build needing -latomic. Issue #6275. 2019-11-29 17:35:59 +01:00
John Sully
5012176262 Nested snapshot garbage collection. Works but huge fragmentation
Former-commit-id: 82b2a3f3dbf8f864d9157655b5422c69845c4019
2019-11-28 19:00:51 -05:00
John Sully
dd5acf2c0d Fastlock should yield in ARM
Former-commit-id: 6c65a11b8d841517f372ea9962b8dbc127390943
2019-11-28 14:26:43 -05:00
Oran Agra
18e72c5cc7 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
28beb05aa3 More improvements and fixes to generic config infra
- Adding is_valid_fn and update_fn, both return 1 for success and 0 for failure with an optional error message.
- Bugfix in handling boundary check of unsigned numeric types (was boundaries as signed)
- Adding more numeric types to generic mechanism: uint, ulonglong, long, time_t, off_t
- More verbose error replies ("argument must be between" in out of range CONFIG SET (like config file parsing)
2019-11-28 11:11:07 +02:00
Oran Agra
e0cc3c99d2 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
27f7c2af00 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
a1b654819c
Merge pull request #6598 from oranagra/module-hook-test
try to fix an unstable test (module hook for loading progress)
2019-11-25 17:54:21 +01:00
Salvatore Sanfilippo
a40669893e
Merge pull request #6609 from daidaotong/macrofix
Add macro in bio.h
2019-11-25 10:04:28 +01:00
Salvatore Sanfilippo
6203ed0474
Merge pull request #6593 from daidaotong/movecommandfix
fix move command: WATCH/MULTI/EXEC mechanism breaks
2019-11-25 10:02:43 +01:00
Salvatore Sanfilippo
d39afb687d
Merge pull request #6563 from devnexen/fbsd_build_fix2
Add missing header
2019-11-25 09:45:29 +01:00
John Sully
1efd066a96 Move snapshot code into its own file
Former-commit-id: 4afd0a6ce650cc93a73ea3e4bb632226087dde37
2019-11-24 17:59:02 -05:00
John Sully
4346bcd7dc Restrict the snapshot API
Former-commit-id: cbafb88f267a9480cdbde6a88e9e1992e8a85971
2019-11-24 17:53:06 -05:00
John Sully
a1f29681aa 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
1badb64289 Fix crash on shutdown
Former-commit-id: 6dc55cc0f838b3c82afb233985429b4e7fc5dfb1
2019-11-24 14:24:41 -05:00
John Sully
dc47a20da3 Fix multithreading data races
Former-commit-id: 80f6e5818fd575cb08a5f620c35eed1cd862eb57
2019-11-24 13:44:43 -05:00
John Sully
a7d378659f Fix warning
Former-commit-id: 1318b87013c61f7149127eae8e30caf887a6db7b
2019-11-23 19:19:54 -05:00
John Sully
b0278f5609 Add support for nesting snapshots
Former-commit-id: 5e6c37f388233cc3f2d204ad17ac2897d3333a21
2019-11-23 19:02:50 -05:00
John Sully
417388bd7a Remove pending async writes if we're freeing the client
Former-commit-id: 8b5caad51136f1ed29a9e4c01ed984f6e7ff9c4c
2019-11-23 19:01:40 -05:00
John Sully
df6d8170ae Add support for removing pending writes for clients we're about to free
Former-commit-id: 67c1fd322e1a12b1b22707d67713d60c97c34cef
2019-11-23 19:00:27 -05:00
John Sully
252db8939b Add support for nested snapshots
Former-commit-id: 43456c7807152062d59b2a90597b6204f637f5cd
2019-11-22 20:53:36 -05:00
antirez
ef5186d920 config.c: remove trailing spaces, trim comments to 80 cols. 2019-11-22 17:54:22 +01:00
Salvatore Sanfilippo
a5e4c95cfd
Merge pull request #6607 from madolson/dev-unstable-new-refactor
Refactored configs into types that can be generic
2019-11-22 17:42:42 +01:00
zhaozhao.zz
6b056d29f3 block: propagate BRPOPLPUSH as RPOPLPUSH when unblock 2019-11-22 16:38:49 +08:00
zhaozhao.zz
2c970532dc Propagation: flag module client as CLIENT_MULTI if needed
in case of nested MULTI/EXEC
2019-11-22 16:20:30 +08:00
zhaozhao.zz
c73d70fb46 Propagation: propagate EXEC directly in lua script 2019-11-22 15:45:21 +08:00
zhaozhao.zz
37a10cef02 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
Madelyn Olson
e8f4010e27 Changed a tab to a space 2019-11-22 06:44:12 +00:00