mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-20 03:13:53 +01:00
* s3: list each part number once, its latest attempt Every UploadPart writes its own NNNN_<uuid>.part entry, so a part number uploaded twice listed twice, superseded ETag included, and a max-parts page could hold only the stale attempt. ListParts now groups the entries by part number, reports the attempt sortEntriesByLatestChunk ranks first (the same order completion uses), and pages over distinct part numbers, reading past a page boundary that splits one part number's attempts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * s3: test ListParts over repeated part attempts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * s3: rank an empty part attempt by commit stamp or mtime An empty UploadPart body stores no chunks, so sortEntriesByLatestChunk gave it time zero and an empty re-upload always lost to the attempt it replaced. Attempts now rank by the filer's commit stamp when both carry one, else by the later of the first chunk's write time and the entry mtime. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * s3: keep only the newest attempt per part while listing parts listPartAttempts held every attempt of a part number until the page was built, so a heavily retried part grew one ListParts request's memory past what max-parts bounds. It now compares each entry against the newest seen for its part number with compareLatestPartAttempt, the comparator sortEntriesByLatestChunk sorts with. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * s3: order part attempts by commit stamp, then attempt time Comparing commit stamps only when both attempts carried one made the order non-transitive across stamped and unstamped attempts, so listing and completion could pick different attempts depending on input order. The commit stamp now leads (unstamped entries predate the field) and the attempt time breaks ties. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * s3: list part 10000 after the four-digit part numbers Part names sort as text, so 10000_<uuid>.part lands between 1000.part and 1000_<uuid>.part. A page could end on part 10000 and the next marker then skipped parts 1000-9999, and a legacy 1000.part could be reported before the newer attempt of part 1000 was read. List the four-digit part numbers first and part 10000 in its own prefix listing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * s3: test ListParts paging across part 10000 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>