mirror of
https://github.com/dragonflydb/dragonfly
synced 2024-11-23 08:02:08 +00:00
fix: test_replication_all failure (#4155)
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>
This commit is contained in:
parent
0e7ae34fe4
commit
36135f516f
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user