Register trackers only after successfull start#7766
Conversation
📝 WalkthroughWalkthroughThis pull request adds a new Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (6)
🧰 Additional context used📓 Path-based instructions (1)**/*.rs📄 CodeRabbit inference engine (.github/review-rules.md)
Files:
🧠 Learnings (2)📚 Learning: 2025-07-11T11:35:21.549ZApplied to files:
📚 Learning: 2025-10-13T22:58:03.121ZApplied to files:
🧬 Code graph analysis (1)lib/collection/src/collection_manager/optimizers/config_mismatch_optimizer.rs (3)
⏰ 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 (19)
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 |
Problem
The optimizers log is polluted with empty cancelled trackers. Consequently, the optimizations endpoint added in #7625 includes many entries like this:
{ "name": "Segment Optimizing", "started_at": "2025-12-09T16:06:18.594754171Z", "finished_at": "2025-12-09T16:06:18.944208155Z", "duration_sec": 0.349453884 }, { "name": "Segment Optimizing", "started_at": "2025-12-09T16:06:18.592540546Z", "finished_at": "2025-12-09T16:06:18.944175295Z", "duration_sec": 0.351634589 }Solution
Postpone
TrackerLog::register()after checking forall_segments_okinsideSegmentOptimizer::optimize.