-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Baseline Resync Enhancement #244
base: baseline_resync
Are you sure you want to change the base?
Conversation
b831af9
to
2a7e47a
Compare
@@ -379,17 +379,6 @@ void HSHomeObject::on_shard_message_commit(int64_t lsn, sisl::blob const& h, hom | |||
local_create_shard(shard_info, v_chunk_id, blkids.chunk_num(), blkids.blk_count()); | |||
if (ctx) { ctx->promise_.setValue(ShardManager::Result< ShardInfo >(shard_info)); } | |||
|
|||
// update pg's total_occupied_blk_count |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant, these codes are already put into the local_create_shard.
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## baseline_resync #244 +/- ##
===================================================
- Coverage 65.52% 64.23% -1.29%
===================================================
Files 33 33
Lines 2271 2416 +145
Branches 254 280 +26
===================================================
+ Hits 1488 1552 +64
- Misses 659 719 +60
- Partials 124 145 +21 ☔ View full report in Codecov by Sentry. |
556376d
to
f743e81
Compare
ce6769f
to
b07084c
Compare
b07084c
to
9ef9f5f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@@ -354,6 +360,13 @@ HSHomeObject::blob_put_get_blk_alloc_hints(sisl::blob const& header, cintrusive< | |||
return folly::makeUnexpected(homestore::ReplServiceError::FAILED); | |||
} | |||
|
|||
auto pg_iter = _pg_map.find(msg_header->pg_id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: can we change this part to is_pg_present
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we need to get the pg_iter as we are going to check index, so we can't use is_pg_present
directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found there is already a pg_exists
function, remove is_pg_present
function.
This commit addresses blob duplication issues caused by resync, it mainly happens when resend snapshot mesg during baseline resync and apply log after snapshot completion. This helps avoid unnecessary GC due to duplicated data. This mechanism is effective only for duplicated blobs. Since we do not record the blks of the `shardInfo` stored in the data service, we are unable to skip data writes for duplicated shards.
ab2184a
to
bc80900
Compare
bc80900
to
ab4b81d
Compare
This PR enhances baseline resync:
This mechanism is effective only for duplicated blobs. Since we do not record the blks of the
shardInfo
stored in the data service, we are unable to skip data writes for duplicated shards.