chore(syncing): avoid sending duplicate events to channel#3207
chore(syncing): avoid sending duplicate events to channel#3207julienrbrt merged 3 commits intomainfrom
Conversation
|
The latest Buf updates on your PR. Results from workflow CI / buf-check (pull_request).
|
|
Claude finished @julienrbrt's task in 1m 24s —— View job Code Review
The change is minimal, correct, and addresses a real issue. Here's my analysis: SummaryThe PR adds a deduplication guard in CorrectnessEarly dedup is sound.
Observability improvementAdding Minor points
VerdictLGTM. The fix is clean and correct with no architectural concerns. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthrough
Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@block/internal/syncing/syncer.go`:
- Around line 520-523: The code calls event.Header.Hash().String()
unconditionally before checking for nil, which can panic if event.Header is nil;
modify the logic in the syncer (where s.cache.IsHeaderSeen is used) to first
guard event.Header != nil and handle the malformed event (e.g., return an error
or skip processing) before calling event.Header.Hash().String(), ensuring no nil
dereference occurs when evaluating s.cache.IsHeaderSeen.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 938af7d1-7520-475d-bcbb-ebf448bd8b93
📒 Files selected for processing (1)
block/internal/syncing/syncer.go
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3207 +/- ##
==========================================
- Coverage 61.46% 61.43% -0.04%
==========================================
Files 120 120
Lines 12462 12469 +7
==========================================
Hits 7660 7660
- Misses 3944 3949 +5
- Partials 858 860 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Seeing a lot of
DBG height already processedin the logs.This skips sending the events earlier.
Summary by CodeRabbit