add sync status logger to improve visibility#2452
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR adds a periodic sync-status log to the eth protocol manager to improve operational visibility into block/state sync progress during long-running synchronisations.
Changes:
- Introduces a
syncStatusLoggergoroutine that periodically logs downloader progress (starting/current/highest blocks, state sync counters, peer count). - Adds a
syncStatusLogCycleconstant (10 minutes) controlling the log interval. - Starts the new logger alongside existing sync goroutines in
ProtocolManager.Start.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
eth/sync.go |
Adds syncStatusLogCycle and ProtocolManager.syncStatusLogger() to periodically log current sync progress. |
eth/handler.go |
Starts syncStatusLogger during protocol manager startup. |
| if pm.downloader.Synchronising() { | ||
| progress := pm.downloader.Progress() | ||
| log.Warn("Block synchronisation in progress", | ||
| "starting", progress.StartingBlock, | ||
| "current", progress.CurrentBlock, |
Proposed changes
add sync status logger to improve visibility
Types of changes
What types of changes does your code introduce to XDC network?
Put an
✅in the boxes that applyImpacted Components
Which parts of the codebase does this PR touch?
Put an
✅in the boxes that applyChecklist
Put an
✅in the boxes once you have confirmed below actions (or provide reasons on not doing so) that