fix: data loss in asyncsearch merge caused by concurrent retention deletion of fracs#459
fix: data loss in asyncsearch merge caused by concurrent retention deletion of fracs#459eguguchkin wants to merge 1 commit into
Conversation
eguguchkin
commented
Jul 7, 2026
- I have read and followed all requirements in CONTRIBUTING.md;
- I used LLM/AI assistance to make this pull request;
|
❌ PR Title Validation Failed |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #459 +/- ##
==========================================
+ Coverage 70.51% 70.74% +0.22%
==========================================
Files 232 232
Lines 18268 18271 +3
==========================================
+ Hits 12881 12925 +44
+ Misses 4426 4389 -37
+ Partials 961 957 -4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🔴 Performance DegradationSome benchmarks have degraded compared to the previous run. Show table
|
…t retention deletion of fracs
d8a766a to
4cf18dd
Compare
| if err != nil { | ||
| if os.IsNotExist(err) { | ||
| // the corresponding fraction may have been removed concurrently by retention, | ||
| // so the qpr file may not exist |
There was a problem hiding this comment.
Wait, but we are reading the .qpr file here which has different lifetime and does not depend on fraction's lifetime. Am I missing something?
Or you mean retention of asyncsearcher (like how long asynchronous request can survive)?
There was a problem hiding this comment.
Issue: when a user starts an async search with from close to the last fraction, the search may take hours. By the time it reaches that fraction, it might already be gone due to rotation. We currently ignore this as a valid case (
seq-db/asyncsearcher/async_searcher.go
Line 403 in 59fdb2b
There was a problem hiding this comment.
Anyway, the async search queue will be reworked to use intervals soon, but for now we see this error a few times a week in logs. Users don't notice the missing data, but we should fix it sooner rather than later.