Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kostasrim committed Nov 6, 2024
1 parent 94955b6 commit 6b3c912
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/server/db_slice.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
7 changes: 5 additions & 2 deletions tests/dragonfly/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 10 additions & 2 deletions tests/dragonfly/replication_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit 6b3c912

Please sign in to comment.