7175 Commits

Author SHA1 Message Date
artix
94f6693395 Cluster Manager del-node: use CLUSTER RESET in place of SHUTDOWN
See issue #5687
2018-12-27 17:20:42 +01:00
antirez
b91f7656fd Modules shared API: export new core APIs. 2018-12-20 17:57:49 +01:00
antirez
692f2297b9 Modules shared API: also unregister the module as user. 2018-12-20 17:57:46 +01:00
antirez
f25bcefb82 Modules shared API: prevent unloading of used modules. 2018-12-20 17:57:43 +01:00
antirez
a41459ea5b Modules shared API: unregister APIs function. 2018-12-20 17:57:40 +01:00
antirez
f7e99b07f3 Modules shared API: initial core functions.
Based on ideas and code in PR #5560 by @MeirShpilraien.
2018-12-20 17:57:35 +01:00
antirez
ea2d253238 Revert shared APIs to modify the design. 2018-12-20 17:56:38 +01:00
MeirShpilraien
2a907e7d00 added module ability to register api to be used by other modules 2018-12-20 17:55:18 +01:00
artix
6c20ebbbb6 Cluster Manager: enable --cluster-replace also for 'fix' command. 2018-12-19 17:29:25 +01:00
artix
de69c77451 Fixed memory leak in clusterManagerCompareKeysValues. 2018-12-18 18:45:10 +01:00
artix
8bcade7cfa Cluster Manager: compare key values after BUSYKEY error (migration).
If a key exists in the target node during a migration (BUSYKEY),
the value of the key on both nodes (source and target) will be compared.
If the key has the same value on both keys, the migration will be
automatically retried with the REPLACE argument in order to override
the target's key.

If the key has different values, the behaviour will depend on such
cases:
- In case of 'fix' command, the migration will stop and the user
  will be warned to manually check the key(s).
- In other cases (ie. reshard), if the user launched the command
  with the --cluster-replace option, the migration will be
  retried with the REPLACE argument, elsewhere the migration will
  stop and the user will be warned.
2018-12-18 17:45:35 +01:00
Guy Benoish
8e9c96adc2 Check server.verbosity in RM_LogRaw 2018-12-13 13:57:38 +01:00
artix
da1fc5e7e4 Cluster Manager: avoid using reply error messages to check slot status.
Slot assignment status is now checked by using CLUSTER SLOTS.
Furthermore, one memory leak has been fixed.
2018-12-12 13:34:43 +01:00
antirez
421c242dd0 freeMemoryIfNeeded() small refactoring.
Related to issue #5686 and PR #5689.
2018-12-12 11:37:15 +01:00
Salvatore Sanfilippo
2b5b4797c4 Merge pull request #5689 from soloestoy/donot-evict-when-AOF-loading
evict: don't care about mem if loading
2018-12-12 11:29:10 +01:00
antirez
93f443510b Crashing is too much in addReplyErrorLength().
See #5663.
2018-12-11 17:50:18 +01:00
zhaozhao.zz
eb86c4c282 evict: don't care about mem if loading
When loading data, we call processEventsWhileBlocked
to process events and execute commands.
But if we are loading AOF it's dangerous, because
processCommand would call freeMemoryIfNeeded to evict,
and that will break data consistency, see issue #5686.
2018-12-12 00:25:58 +08:00
antirez
f3409c523a Merge branch 'unstable' of github.com:/antirez/redis into unstable 2018-12-11 13:30:04 +01:00
antirez
44d75945aa stringmatchlen() fuzz test added.
Verified to be able to trigger at least #5632. Does not report other
issues.
2018-12-11 13:29:30 +01:00
antirez
f0954d0709 Fix stringmatchlen() read past buffer bug.
See #5632.
2018-12-11 13:18:52 +01:00
Salvatore Sanfilippo
f710858702 Merge pull request #5665 from louiszhw/unstable
fix comments fault discription
2018-12-11 13:03:09 +01:00
Salvatore Sanfilippo
c690980158 Merge pull request #4264 from lsytj0413/unstable
fix a typo: craeted -> created
2018-12-11 13:02:28 +01:00
zhaozhao.zz
8bc763dd27 fix typo 2018-12-11 19:53:54 +08:00
zhaozhao.zz
5c1f6df2ba multi: ignore multiState's cmd_flags when loading AOF 2018-12-11 19:47:36 +08:00
antirez
83b0df508c Reject EXEC containing write commands against RO replica.
Thanks to @soloestoy for discovering this issue in #5667.
This is an alternative fix in order to avoid both cycling the clients
and also disconnecting clients just having valid read-only transactions
pending.
2018-12-11 11:39:21 +01:00
artix
4d2e9f9004 Cluster Manager:
- Multiple owners checking in 'fix'/'check' commands is now
  optional (using --cluster-search-multiple-owners).
- Updated help.
2018-12-10 18:01:18 +01:00
artix
08c05082fd Cluster Manager:
- FixOpenSlot now correctly updates in-memory cluster configuration.
    - Improved output messages.
2018-12-10 17:43:58 +01:00
artix
41535a5003 Cluster Manager: 'fix' command now handles open slots with migrating state
in one node and importing state in multiple nodes.
2018-12-10 17:43:58 +01:00
artix
d066613606 Cluster Manager: setting new slot owner is now handled atomically
in 'fix' command.
2018-12-10 17:43:58 +01:00
artix
e2d620cd04 Cluster Manager: code cleanup. 2018-12-10 17:43:58 +01:00
artix
eeaddda237 Cluster Manager: check/fix commands now handle multiple owners even if
all slots are covered and not open.
2018-12-10 17:39:54 +01:00
Salvatore Sanfilippo
94da11be70 Merge pull request #5626 from soloestoy/remove-useless-code
remove useless tryObjectEncoding in debug assert
2018-12-07 17:09:56 +01:00
Salvatore Sanfilippo
c00d3fc6c2 Merge pull request #5633 from oranagra/frag_bytes_signed
fix #5580, display fragmentation and rss overhead bytes as signed
2018-12-07 17:09:10 +01:00
antirez
3deb22f4fe Merge branch 'unstable' of github.com:/antirez/redis into unstable 2018-12-07 17:07:14 +01:00
antirez
a89803cff1 Remove no longer relevant comment in processCommand(). 2018-12-07 17:06:55 +01:00
Salvatore Sanfilippo
4b6ec70991 Merge pull request #5673 from soloestoy/check-current-client-after-freememory
networking: current_client should not be NULL when trim qb_pos
2018-12-07 17:03:48 +01:00
antirez
839fad129e DEBUG DIGEST-VALUE implemented. 2018-12-07 16:41:54 +01:00
antirez
cf9be5c4d1 DEBUG DIGEST refactoring: extract function to digest a value. 2018-12-07 16:30:33 +01:00
zhaozhao.zz
000eb0fcec networking: current_client should not be NULL when trim qb_pos 2018-12-07 19:14:33 +08:00
yura
041e368090 redis-cli reshard/rebalance: ability to force replacement on existing keys 2018-12-07 14:14:11 +03:00
Salvatore Sanfilippo
d0383c6b82 Merge pull request #5460 from krallin/env-password
cli: pass auth through REDISCLI_AUTH
2018-12-07 11:30:07 +01:00
Salvatore Sanfilippo
9aa743bf01 Merge pull request #5664 from yongman/fix-rediscli-output-format
Fix cluster call reply format readable
2018-12-07 11:28:18 +01:00
lsytj0413
2538516df1 fix a typo: craeted -> created 2018-12-06 11:08:59 +08:00
hdmg
7b6cc08d26 fix comments fault discription 2018-12-05 17:15:02 +08:00
yongman
00beb60aaa Fix cluster call reply format readable 2018-12-04 17:36:42 +08:00
Madelyn Olson
e2f8bebfbb Fixed a serverPanic when sending an invalid command to a monitor client 2018-12-04 07:17:17 +00:00
Oran Agra
bad0b20979 fix #5580, display fragmentation and rss overhead bytes as signed
these metrics become negative when RSS is smaller than the used_memory.
This can easily happen when the program allocated a lot of memory and haven't
written to it yet, in which case the kernel doesn't allocate any pages to the process
2018-12-02 15:29:20 +02:00
zhaozhao.zz
ee10f92058 remove useless tryObjectEncoding in debug assert 2018-11-30 12:05:46 +08:00
Salvatore Sanfilippo
d2777b3a8d Merge pull request #5562 from soloestoy/memory-usage-more-accurate
MEMORY command: make USAGE more accurate
2018-11-28 18:16:04 +01:00
Salvatore Sanfilippo
d9742f911a Merge pull request #5594 from yongman/fix-rediscli-fixcoverage
Fix choose a random master node for slot assignment
2018-11-28 18:13:04 +01:00