Always capture segments flusher first for consistency#7882
Conversation
📝 WalkthroughWalkthroughThis pull request refactors the flusher collection logic in the segment holder's flush path. A comment is added to document the intent of improving data consistency. More significantly, flusher callbacks are pre-collected once before the sync/async branching logic, eliminating the need to iterate through segment_reads multiple times. The pre-collected flushers are then reused in both the synchronous execution path and the background flush thread, consolidating the collection mechanism. Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used📓 Path-based instructions (1)**/*.rs📄 CodeRabbit inference engine (.github/review-rules.md)
Files:
🧠 Learnings (9)📓 Common learnings📚 Learning: 2025-10-13T09:34:22.740ZApplied to files:
📚 Learning: 2025-09-01T11:42:06.964ZApplied to files:
📚 Learning: 2025-04-17T10:52:59.516ZApplied to files:
📚 Learning: 2025-08-11T00:37:34.100ZApplied to files:
📚 Learning: 2025-09-01T11:19:26.371ZApplied to files:
📚 Learning: 2025-08-15T11:42:00.297ZApplied to files:
📚 Learning: 2025-10-13T22:58:03.121ZApplied to files:
📚 Learning: 2025-08-15T11:41:10.629ZApplied to files:
🧬 Code graph analysis (1)lib/shard/src/segment_holder/flush.rs (4)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
🔇 Additional comments (2)
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 |
timvisee
left a comment
There was a problem hiding this comment.
I don't believe it matters, but I like both now use the same approach.
Small change for the sake of consistency and flushing hygiene.
It unfortunately does not fix our data inconsistency issue but makes sure we capture the internal states at roughly the same time.