Skip to content

Improve baseline resync logging - #455

Open
koujl wants to merge 1 commit into
eBay:stable/v4.xfrom
koujl:br-log
Open

Improve baseline resync logging#455
koujl wants to merge 1 commit into
eBay:stable/v4.xfrom
koujl:br-log

Conversation

@koujl

@koujl koujl commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Eliminate inconsistent terminology, context, and severity levels across existing BR read/write logs. Add structured lifecycle, payload, retry, and failure records with consistent PG, shard, batch, blob, and block identifiers. Keep key object and payload transitions at INFO while moving per-blob details to TRACE to reduce routine log noise.

@codecov-commenter

codecov-commenter commented Jul 31, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 0% with 56 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (stable/v4.x@ec55254). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...ib/homestore_backend/replication_state_machine.cpp 0.00% 25 Missing ⚠️
src/lib/homestore_backend/pg_blob_iterator.cpp 0.00% 16 Missing and 1 partial ⚠️
...lib/homestore_backend/snapshot_receive_handler.cpp 0.00% 14 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@              Coverage Diff               @@
##             stable/v4.x     #455   +/-   ##
==============================================
  Coverage               ?   55.02%           
==============================================
  Files                  ?       36           
  Lines                  ?     5350           
  Branches               ?      676           
==============================================
  Hits                   ?     2944           
  Misses                 ?     2110           
  Partials               ?      296           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Eliminate inconsistent terminology, context, and severity levels across
existing BR read/write logs. Add structured lifecycle, payload, retry,
and failure records with consistent PG, shard, batch, blob, and block
identifiers. Keep key object and payload transitions at INFO while
moving per-blob details to TRACE to reduce routine log noise.
@koujl
koujl marked this pull request as ready for review August 3, 2026 08:11
@JacksonYao287

JacksonYao287 commented Aug 5, 2026

Copy link
Copy Markdown
Member

only log changes in this PR, no logic changes, right?

Comment on lines +292 to +301
return std::make_error_code(std::errc::io_error);
}
// Add local blob info to index & PG
bool success =
home_obj_.local_add_blob_info(ctx_->pg_id, BlobInfo{ctx_->shard_cursor, blob_id, blk_id});
if (!success) {
LOGE("Failed to add blob info for blob_id={}", blob_id);
LOGE("Failed to index resync blob: pg={}, shard_id=0x{:x}, blob={}, blkid={}", ctx_->pg_id,
ctx_->shard_cursor, blob_id, blk_id.to_string());
homestore::data_service().async_free_blk(blk_id).get();
return err;
return std::make_error_code(std::errc::io_error);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JacksonYao287 All the changes are solely log optimizations, except a minor bugfix here detected during the log optimization, regarding the async return value.

@Besroy

Besroy commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

LGTM. After this PR is merged, what log mode do you expect? IIRC production homeobject currently uses info, while SH tests use debug.

@koujl

koujl commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

LGTM. After this PR is merged, what log mode do you expect? IIRC production homeobject currently uses info, while SH tests use debug.

Let's keep the production log level at 'info' as the current SM sherlock collection is already overwhelmed. For SH we can elevate the level to trace manually only when we're reproducing bugs involving blob-level behaviors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants