Skip to content

Commit

Permalink
fix: test_replication_all failure (#4155)
Browse files Browse the repository at this point in the history
Fixes #4150. The failure can be reproduced with high probability on ARM via
`pytest dragonfly/replication_test.py -k test_replication_all[df_factory0-mode0-8-t_replicas3-seeder_config3-2000-False]`

Not sure why this barrier is needed but #4146 removes the barrier
which breaks a gentle balance in the code in unexpected way.

Signed-off-by: Roman Gershman <[email protected]>
  • Loading branch information
romange authored Nov 20, 2024
1 parent 0e7ae34 commit 36135f5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/server/journal/executor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ void JournalExecutor::SelectDb(DbIndex dbid) {
auto cmd = BuildFromParts("SELECT", dbid);
Execute(cmd);
ensured_dbs_[dbid] = true;

// TODO: This is a temporary fix for #4146.
// For some reason without this the replication breaks in regtests.
auto cb = [](EngineShard* shard) { return OpStatus::OK; };
shard_set->RunBriefInParallel(std::move(cb));
} else {
conn_context_.conn_state.db_index = dbid;
}
Expand Down

0 comments on commit 36135f5

Please sign in to comment.