Files
seaweedfs/weed
975d79d57f filer: keep chunk coverage when timestamps tie in readResolvedChunks (#12940)
* filer: keep chunk coverage when timestamps tie in readResolvedChunks

When an overlapping chunk started with the same ModifiedTsNs as the
currently visible one, it was never inserted into the sweep queue, and
an END point removed whichever queued chunk had a matching ts rather
than the chunk that actually ended. Either way part of the file was
dropped from the visible intervals, and SeparateGarbageChunks could then
treat the still-live chunk as garbage.

Insert tied starts ahead of the existing tail so the visible chunk keeps
winning, and remove the queued entry for the chunk that is ending.

Fixes #12934

* filer: break readResolvedChunks timestamp ties by chunk order

On a tie the sweep let the chunk that started first keep the overlap, while
MergeIntoVisibles, which a section uses when a chunk is added after its
first read, lets the later chunk win. A later write that got the same
timestamp lost its overlap, and the two paths disagreed on which chunk's
bytes a read returns and which chunk is garbage. Ties now go to the later
chunk in the list, which also makes the order total.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 12:29:25 -08:00
..
2026-04-14 20:48:24 -07:00
2026-04-23 10:05:51 -07:00