Skip to content

Commit 5c85028

Browse files
yawzhangBesroy
authored andcommitted
Fix ut
When using spawn to restart the leader, the leader re-runs the ut and attempts to re-create the PG. Since the PG has been updated by `replace_member`, `create_pg` failed due to differences in PGs. This fix ensures `create_pg` is skipped after the leader restart to avoid the issue.
1 parent 853c14f commit 5c85028

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

conanfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class HomeObjectConan(ConanFile):
1212
name = "homeobject"
13-
version = "2.6.6"
13+
version = "2.6.7"
1414

1515
homepage = "https://github.com/eBay/HomeObject"
1616
description = "Blob Store built on HomeReplication"

src/lib/homestore_backend/tests/test_homestore_backend_dynamic.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ void HomeObjectFixture::RestartFollowerDuringBaselineResyncUsingSigKill(uint64_t
8787
for (size_t i = num_replicas; i < num_replicas + spare_num_replicas; i++)
8888
excluding_replicas_in_pg.insert(i);
8989

90-
create_pg(pg_id, 0 /* pg_leader */, excluding_replicas_in_pg);
90+
if (!is_restart) { create_pg(pg_id, 0 /* pg_leader */, excluding_replicas_in_pg); }
9191

9292
// we can not share all the shard_id and blob_id among all the replicas including the spare ones, so we need to
9393
// derive them by calculating.
@@ -544,7 +544,7 @@ void HomeObjectFixture::RestartLeaderDuringBaselineResyncUsingSigKill(uint64_t f
544544
excluding_replicas_in_pg.insert(i);
545545

546546
auto initial_leader_replica_num = 1;
547-
create_pg(pg_id, initial_leader_replica_num /* pg_leader */, excluding_replicas_in_pg);
547+
if (!is_restart) { create_pg(pg_id, initial_leader_replica_num /* pg_leader */, excluding_replicas_in_pg); }
548548
peer_id_t initial_leader_replica_id = get_leader_id(pg_id);
549549

550550
auto num_shards_per_pg = SISL_OPTIONS["num_shards"].as< uint64_t >();

0 commit comments

Comments
 (0)