writecache: fix potential double flush error#3682
Merged
roman-khimov merged 1 commit intomasterfrom Nov 19, 2025
Merged
Conversation
The following errors were detected during performance testing:
warn writecache/flush.go:50 flush scheduler paused due to error {"shard_id": "DVLS7az3U6AY5qZ8GHwsaP", "substorage": "write-cache", "delay": 10}
error writecache/flush.go:167 can't flush objects {"shard_id": "DVLS7az3U6AY5qZ8GHwsaP", "substorage": "write-cache", "worker": 6, "first_object": "8dsJKm3xFpiDS8etCjaYaEBxPdgmYZJJtfjvuWFMHmzv/E5k23T1EZuyzjY67p3PvzbJmGfL6XxkHjxBiE536244R", "error": "logical error: status: code = 2049 message = object not found"}
This could potentially happen because of double-deletion of addrs from
flushObjs, flushScheduler() can fetch the same addrs twice because of that.
An easy fix is to nullify addrs in post-flush case, but we better simplify
lusher thread logic and avoid duplication at all.
Signed-off-by: Roman Khimov <roman@nspcc.ru>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3682 +/- ##
=======================================
Coverage 27.35% 27.35%
=======================================
Files 658 658
Lines 41705 41700 -5
=======================================
+ Hits 11408 11409 +1
+ Misses 29236 29231 -5
+ Partials 1061 1060 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
End-rey
approved these changes
Nov 19, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The following errors were detected during performance testing:
This could potentially happen because of double-deletion of addrs from flushObjs, flushScheduler() can fetch the same addrs twice because of that. An easy fix is to nullify addrs in post-flush case, but we better simplify lusher thread logic and avoid duplication at all.