Commit Graph
10403 Commits
Author SHA1 Message Date
christianEQ 0ae13c9731 tabs -> spaces 2021-07-12 18:55:44 +00:00
christianEQ f1f52af9cf fix for #323: seg fault on expiremember 2021-07-08 02:50:05 +00:00
John Sully b1f662d639 Don't pass on flags indicating membership in a list 2021-05-30 05:11:18 +00:00
John Sully aa5b27b040 Fix a leak in the benchmark 2021-05-30 02:55:39 +00:00
John Sully e8a44821d0 Ensure our connections are touched only on the right thread 2021-05-30 02:08:30 +00:00
John Sully 92e48f0717 Handle race where a different thread cancels the replication but we haven't closed the connection 2021-05-30 02:08:02 +00:00
John Sully 9742c44db5 Delete pipe on the right thread so event handlers are cleaned up 2021-05-30 02:07:31 +00:00
John Sully 5d16f51950 Don't leave dangling client pointers in the process list 2021-05-30 02:06:47 +00:00
John Sully 1ed2e8b5bc Don't leak AE control pipes to fork children 2021-05-30 02:06:20 +00:00
John Sully 083b54472c Mac build break fixes 2021-05-28 22:40:03 -04:00
John Sully d3c37c7159 Fix failover command test failures 2021-05-29 01:19:12 +00:00
John Sully 807f020184 Remove dup'd code from merge 2021-05-29 01:08:52 +00:00
John Sully b400be68b7 ProcessingEventsWhileBlocked is relevant only to the current thread 2021-05-29 01:08:43 +00:00
John Sully e39bdb58ec Make processClients reentrant 2021-05-29 01:08:14 +00:00
John Sully 83c8977033 Don't have dangling expires 2021-05-29 01:07:46 +00:00
John Sully 7ee766aee1 Ensure multi-thread handling of cached master is equivalent to single thread case 2021-05-26 17:29:47 +00:00
John Sully 848c5ad784 Avoid differences between single thread and multi-thread 2021-05-26 17:29:01 +00:00
John Sully a41fb1b036 Eliminate test issue while clients wait for async free 2021-05-26 01:18:47 +00:00
John Sully 915117ae7b Fix failure sending deferred aggregate lengths to clients on other threads (merge bug) 2021-05-25 20:51:18 +00:00
John Sully de5fa78762 Remove duplicate code 2021-05-25 20:50:40 +00:00
John Sully b0c8efd840 Fix TLS test failure due to tls-port not marked as runtime configurable 2021-05-25 20:50:23 +00:00
John Sully 1dcd5edbf9 Fix crash in TLS due to merge 2021-05-25 18:52:27 +00:00
John Sully 87d7fc8e5d Build break fix: Remove dependency on future C++ feature 2021-05-25 18:52:08 +00:00
John Sully 100a747eab More OS X build breaks 2021-05-25 18:35:45 +00:00
John Sully 105fd03ef8 OS X build break fix 2021-05-25 18:32:31 +00:00
John Sully 9395a9c1d9 Fix uninitialized variable 2021-05-25 18:30:07 +00:00
John Sully 02f7efd9d4 Fix duplicate checks (resolve PR comments) 2021-05-25 16:57:49 +00:00
John Sully aea86c5977 Fix TLS Build Errors 2021-05-25 16:55:59 +00:00
John Sully 93ebb31b17 Merge tag '6.2.2' into unstable 2021-05-21 05:54:39 +00:00
John Sully bfed57e3e0 Merge tag '6.2.1' into unstable 2021-05-19 02:59:48 +00:00
John Sully 23647390e6 Fix test hang 2021-05-07 00:28:10 +00:00
VivekSainiEQ 96bca72bb4 Changed branding in various locations 2021-05-06 20:13:45 -04:00
Oran Agra aa730ef1ea Redis 6.2.2 2021-04-19 21:39:40 +03:00
Oran Agra f5ca1f9ee9 Merge unstable into 6.2 2021-04-19 21:36:00 +03:00
Viktor Söderqvist 61d3fdb474 Fix space included in links in modules API doc (#8818) 2021-04-19 21:35:14 +03:00
Hanna Fadida 53a4d6c3b1 Modules: adding a module type for key space notification (#8759)
Adding a new type mask ​for key space notification, REDISMODULE_NOTIFY_MODULE, to enable unique notifications from commands on REDISMODULE_KEYTYPE_MODULE type keys (which is currently unsupported).

Modules can subscribe to a module key keyspace notification by RM_SubscribeToKeyspaceEvents,
and clients by notify-keyspace-events of redis.conf or via the CONFIG SET, with the characters 'd' or 'A' 
(REDISMODULE_NOTIFY_MODULE type mask is part of the '**A**ll' notation for key space notifications).

Refactor: move some pubsub test infra from pubsub.tcl to util.tcl to be re-used by other tests.
2021-04-19 21:33:26 +03:00
guybe7 f40ca9cb58 Modules: Replicate lazy-expire even if replication is not allowed (#8816)
Before this commit using RM_Call without "!" could cause the master
to lazy-expire a key (delete it) but without replicating to replicas.
This could cause the replica's memory usage to gradually grow and
could also cause consistency issues if the master and replica have
a clock diff.
This bug was introduced in #8617

Added a test which demonstrates that scenario.
2021-04-19 17:16:02 +03:00
7a3d1487e4 ACL channels permission handling for save/load scenario. (#8794)
In the initial release of Redis 6.2 setting a user to only allow pubsub access to
a specific channel, and doing ACL SAVE, resulted in an assertion when
ACL LOAD was used. This was later changed by #8723 (not yet released),
but still not properly resolved (now it errors instead of crash).

The problem is that the server that generates an ACL file, doesn't know what
would be the setting of the acl-pubsub-default config in the server that will load it.
so ACL SAVE needs to always start with resetchannels directive.

This should still be compatible with old acl files (from redis 6.0), and ones from earlier
versions of 6.2 that didn't mess with channels.

Co-authored-by: Harkrishn Patro <harkrisp@amazon.com>
Co-authored-by: Oran Agra <oran@redislabs.com>
2021-04-19 13:27:44 +03:00
Wen Hui 0413fbc7d0 fix invalid master_link_down_since_seconds in info repication (#8785)
When replica never successfully connect to master, server.repl_down_since
will be initialized to 0, therefore, the info master_link_down_since_seconds
was showing the current unix timestamp, which does not make much sense.

This commit fixes the issue by showing master_link_down_since_seconds to -1.
means the replica never connect to master before.

This commit also resets this variable back to 0 when a replica is turned into
a master, so that it'll behave the same if the master is later turned into a
replica again.

The implication of this change is that if some app is checking if the value is > 60
do something, like conclude the replica is stale, this could case harm (changing
a big positive number with a small one).
2021-04-19 09:34:21 +03:00
guybe7 a60016e061 ReplicationCron: Prevent invalid access to freed pointer (#8799)
Fixes #8797
2021-04-16 16:56:38 +03:00
Wen Hui 374401d786 Avoid close before logging to preserve errno (#8703) 2021-04-15 21:11:40 +03:00
guybe7 7d749d810b Fix error reply in case zset command is not the STORE variant (#8793) 2021-04-15 18:36:51 +03:00
guybe7 d63d02601f Add a timeout mechanism for replicas stuck in fullsync (#8762)
Starting redis 6.0 (part of the TLS feature), diskless master uses pipe from the fork
child so that the parent is the one sending data to the replicas.
This mechanism has an issue in which a hung replica will cause the master to wait
for it to read the data sent to it forever, thus preventing the fork child from terminating
and preventing the creations of any other forks.

This PR adds a timeout mechanism, much like the ACK-based timeout,
we disconnect replicas that aren't reading the RDB file fast enough.
2021-04-15 17:18:51 +03:00
Bonsai 0a2621c673 clean condition and variable store to nwritten that is never read (#8788) 2021-04-14 22:44:08 -07:00
Bonsai 07601b7e07 fix typo, stracture to structure (#8784) 2021-04-14 15:46:54 +03:00
Viktor Söderqvist d7920ff9b1 Modules API docs: Sections and links (#8442)
* Modules API docs: Link API function names to their definitions

Occurrences of API functions are linked to their definition.

A function index with links to all functions is added on the bottom
of the page.

Comment blocks in module.c starting with a markdown h2 heading are
used as sections. A table of contents is generated from these
headings.

The functions names are changed from h2 to h3, since they are now
rendered as sub-headings within each section.

Existing sections in module.c are used with some minor changes.
Some documentation text is added or sligtly modified.

The markdown renderer will add IDs which may clash with our
generated IDs. By prefixing section IDs with "section-" we make
them different.

Replace double dashes with a unicode long ndash
2021-04-14 00:58:05 +03:00
Huang Zhw c6cd1e59b1 Remove extra param in role-change event of sentinelEvent. (#8742) 2021-04-13 20:19:42 +03:00
Viktor Söderqvist 4938052f6b Small doc fix for stream module API (#8757)
In a code example, using RedisModule_FreeString instead of
RedisModule_Free makes it behave correctly regardless of whether
automatic memory is used or not.
2021-04-13 20:14:12 +03:00
Oran Agra b278e44376 Revert "Fix: server will crash if rdbload or rdbsave method is not provided in module (#8670)" (#8771)
This reverts commit 808f3004f0.
2021-04-13 17:41:46 +03:00
Wen Hui 38da8d07d0 Clean up no-conf server warning for sentinel mode (#8769) 2021-04-13 16:28:54 +03:00