* Normalize chunk identities during garbage comparison
* Keep replication chunk respellings observable
* filer: skip the needle identity index when nothing is subtracted
Every compaction subtracted its retained chunks from an often empty
covered list, parsing and re-formatting each retained file ID first.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* filer: skip the identity subtraction at the compaction call site
Returning early from doMinusChunks on an empty minuend stopped
MinusChunks from calling GetFileIdString on the new entry's chunks.
After CreateEntry of a new file, the caller's chunks then kept the
FileId that BeforeEntrySerialization cleared, so tus completion built
its still-referenced set from empty IDs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* filer: match needle spellings through DoMinusChunks instead of a new function
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* filer: DoMinusChunks always matches chunks by needle
Drop the byNeedle parameter so DoMinusChunks keeps its two-argument
signature and every caller, including ones added on master since,
compares equivalent file ID spellings as the same needle. The needle
normalization moves from the server scope checks to filer.ChunkIdentity
so both share it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* filersink: match replicated source file IDs by needle
compareChunks no longer reports a respelled source chunk, so the
replica keeps the SourceFileId it was copied under. Removing chunks the
source dropped and judging stale backup chunks now compare that ID by
needle, otherwise a later removal in the other spelling would leave the
replica's chunk behind.
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>
* filer: fail the request, not the process, when chunks cannot be resolved
CompactFileChunks and ViewFromChunks discarded the error from
NonOverlappingVisibleIntervals and iterated the nil interval list it
returns on failure. A CreateEntry or UpdateEntry whose context was
cancelled therefore panicked in SeparateGarbageChunks and took the whole
filer down, losing the metadata log it had not yet flushed.
Both functions now return the error. cleanupChunks fails the request
with it, the mount flush paths return it, the replication sinks and the
S3 SSE range reader return it, and a ChunkStreamReader that cannot build
its view fails every read with it and reports it as its SourceError
instead of reading as an empty file.
Fixes#11682
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* filer: propagate chunk resolution failures in scan paths
NonOverlappingVisibleIntervals can fail without a cancelled context; the
query engine and log-store callers discarded the error and dereferenced
nil intervals.
* query: propagate chunk resolution errors instead of skipping files
When a manifest cannot be resolved, ReadParquetStatistics,
countLiveLogRowsExcludingParquetSources, and computeLiveLogMinMax logged a
warning and skipped the failed file, so queries returned understated counts
and wrong min/max values. Surface the errors instead: the fast-path
aggregation collector now returns a DataSourceError so the engine falls
back to a full scan, and the row-count helpers return the error rather
than a partial total.
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com>
Co-authored-by: Chris Lu <chris.lu@gmail.com>