Remove incomplete fix of a broader problem (#10013)

Preventing COFIG SET maxmemory from propagating is just the tip of the iceberg.
Module that performs a write operation in a notification can cause any
command to be propagated, based on server.dirty

We need to come up with a better solution.
This commit is contained in:
guybe7 2021-12-28 09:19:58 +01:00 committed by GitHub
parent 2c5573e894
commit 266d95066d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -2207,9 +2207,6 @@ static int updateMaxmemory(const char **err) {
}
performEvictions();
}
/* The function is called via 'CONFIG SET maxmemory', we don't want to propagate it
* because server.dirty might have been incremented by performEvictions() */
preventCommandPropagation(server.current_client);
return 1;
}

View File

@ -174,6 +174,7 @@ tags "modules" {
# Note whenever there's double notification: SET with EX issues two separate
# notifications: one for "set" and one for "expire"
# "config set" should not be here, see https://github.com/redis/redis/issues/10014
assert_replication_stream $repl {
{select *}
{multi}
@ -197,6 +198,7 @@ tags "modules" {
{del asdf*}
{incr notifications}
{del asdf*}
{config set maxmemory 1}
{multi}
{incr notifications}
{set asdf4 4}