From 6b3c9120790a23330e34b5cc196dfc234e4f2558 Mon Sep 17 00:00:00 2001 From: kostas Date: Wed, 6 Nov 2024 15:30:20 +0200 Subject: [PATCH] fixes --- src/server/db_slice.cc | 1 - tests/dragonfly/instance.py | 7 +++++-- tests/dragonfly/replication_test.py | 12 ++++++++++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/server/db_slice.cc b/src/server/db_slice.cc index acc3ccfc4d73..ef5ae837aebf 100644 --- a/src/server/db_slice.cc +++ b/src/server/db_slice.cc @@ -1370,7 +1370,6 @@ void DbSlice::RegisterWatchedKey(DbIndex db_indx, std::string_view key, } void DbSlice::UnregisterConnectionWatches(const ConnectionState::ExecInfo* exec_info) { - // Because we might remove while another fiber is preempted and miss a notification for (const auto& [db_indx, key] : exec_info->watched_keys) { auto& watched_keys = db_arr_[db_indx]->watched_keys; if (auto it = watched_keys.find(key); it != watched_keys.end()) { diff --git a/tests/dragonfly/instance.py b/tests/dragonfly/instance.py index 8550114ac9ea..67885f48da31 100644 --- a/tests/dragonfly/instance.py +++ b/tests/dragonfly/instance.py @@ -124,8 +124,11 @@ def __init__(self, params: DflyParams, args): if threads > 1: self.args["num_shards"] = threads - 1 - # Add 1 byte limit for big values - self.args["serialization_max_chunk_size"] = 1 + if "disable_serialization_max_chunk_size" not in self.args: + # Add 1 byte limit for big values + self.args["serialization_max_chunk_size"] = 1 + else: + self.args.pop("disable_serialization_max_chunk_size") def __del__(self): assert self.proc == None diff --git a/tests/dragonfly/replication_test.py b/tests/dragonfly/replication_test.py index cd793b6d76a0..fea3def7b1e3 100644 --- a/tests/dragonfly/replication_test.py +++ b/tests/dragonfly/replication_test.py @@ -2407,9 +2407,17 @@ async def test_replicate_old_master( dfly_version = "v1.19.2" released_dfly_path = download_dragonfly_release(dfly_version) - master = df_factory.create(version=1.19, path=released_dfly_path, cluster_mode=cluster_mode) + master = df_factory.create( + disable_serialization_max_chunk_size=0, + version=1.19, + path=released_dfly_path, + cluster_mode=cluster_mode, + ) replica = df_factory.create( - cluster_mode=cluster_mode, cluster_announce_ip=announce_ip, announce_port=announce_port + disable_serialization_max_chunk_size=0, + cluster_mode=cluster_mode, + cluster_announce_ip=announce_ip, + announce_port=announce_port, ) df_factory.start_all([master, replica])