Skip to content

Commit

Permalink
fix: test_replication_all failure
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 <roman@dragonflydb.io>
  • Loading branch information
romange committed Nov 19, 2024
1 parent 4e7800f commit 5f66b76
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 5f66b76

Please sign in to comment.