Repository navigation
Conversation
Pre-PR validation gate
Session id: cron:clickhouse-worker-slot-0:20260611-044100 |
|
cc @CurtizJ @alesapin — could you review this? It replaces the opaque |
|
Workflow [PR], commit [6ac8ede] Summary: ❌
AI ReviewSummaryThis PR replaces the opaque missing-marks-file error with Findings
Tests
Final VerdictChanges requested. The current patch is an improvement for eager local-disk reads, but it still leaves supported deferred-read carriers on the old opaque exception path. LLVM Coverage ReportMeasured on commit 6ac8ede.
Changed lines: Changed C/C++ lines covered: 69/78 (88.46%) · Uncovered code |
Pre-PR validation gate (updated for 91c0bc2)
Session id: cron:clickhouse-worker-slot-12:20260611-103400 |
Pre-PR validation gate (fixup 839c3a1: reuse diagnostic in index-granularity loaders)
Session id: cron:clickhouse-worker-slot-10:20260611-133800 |
Pre-PR validation gate (fixup d5af284 — make 03810 output locale independent)
Note on the "Server died" rows seen on the flaky-check lane: investigated the flaky-check job logs (amd_tsan run 27353273481). Those are NOT this test crashing - the server was still cold-starting ( Session id: cron:clickhouse-worker-slot-7:20260611-154700 |
Pre-PR validation gateAddresses the
Note: the Session id: cron:clickhouse-worker-slot-2:20260611-172800 |
Pre-PR validation gate (fixup 1b7877d)This addresses the flaky-check /
Session id: cron:clickhouse-worker-slot-6:20260611-202200 |
Pre-PR validation gate (fixup 026f932)Root cause of the flaky-check /
Session id: cron:clickhouse-worker-slot-6:20260611-202200 |
Pre-PR validation gateThis fixup (f21bb21) is a test-only change: it adds compact-part coverage (Case 3) to
Session id: cron:clickhouse-worker-slot-2:20260611-214800 |
|
CI fully finished on HEAD CI ledger (covered SHA f21bb21):
All failures explained + tracked, none PR-caused. Ready for review. cc @CurtizJ @alesapin (comp-mergetree). Session: cron:our-pr-ci-monitor:20260612-023000 |
|
CI summary for HEAD Session: cron:our-pr-ci-monitor:20260612-033000 |
…on disk
MergeTreeMarksLoader::loadMarksImpl() computes the marks file path from the
part's own checksums (getStreamNameForColumn only returns a stream name that is
present in the part's checksums), so the file is expected to exist on disk. When
it does not, getFileSize() surfaces an opaque
std::filesystem::filesystem_error: in file_size: No such file or directory [.../<col>.cmrk2]
(Code 1001) with no indication of which part is affected or what its on-disk
state is. This shows up in the flaky integration test
test_rename_column::test_rename_distributed_parallel_insert_and_select under
heavy concurrent RENAME COLUMN + INSERT + SELECT load, where it is impossible to
diagnose from the message alone.
Check for the file's existence before calling getFileSize() and, when it is
missing, throw NO_FILE_IN_DATA_PART with the part name, path, columns, the files
listed in the part's checksums, and the actual on-disk listing. The check runs
only on the error path, so successful reads are unaffected.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
…and qualify the checksums claim
Two review points on the marks-file diagnostic:
1. The previous standalone existsFile precheck did not help the concurrent
race the PR targets: if the file disappeared after the probe but before
getFileSize/readFile, the opaque std::filesystem error was still surfaced.
The diagnostic is now raised from the catch path of the actual getFileSize
and readFile operations (re-probing existsFile), so it also fires when the
file vanishes mid-operation.
2. The message asserted unconditionally that the file is "listed in the part's
checksums", but loadMarksImpl does not verify that and other callers build
the marks path from index stream names rather than column checksums. The
wording now branches on getChecksums().files.contains(mrk_path) ("listed" vs
"NOT listed"), so it does not mislead about metadata-vs-disk for non-column
callers.
The stateless test 03810_missing_marks_file_error removes a column stream's
marks file (which is in checksums) and asserts both the typed error and the
"listed" wording.
The previous review-fixup commit (91c0bc2) introduced two CI failures on its own diff: 1. arm_tidy / clang-tidy under -Werror: refactoring the file access into the throwIfMarksFileMissing lambda left `size_t file_size;` declared without an initializer, which cppcoreguidelines-init-variables rejects. Initialize it to 0 at the declaration (matches how master declared it before the PR). 2. Style check (various): the new stateless test issues SYSTEM DROP MARK CACHE, which touches server-wide shared state, so various_checks.sh requires the no-parallel tag. Add no-parallel to the test's Tags line. No behavior change: the diagnostic and the regression test assertions are unchanged. Co-Authored-By: Claude Opus 4.8 <[email protected]>
The typed NO_FILE_IN_DATA_PART diagnostic only fired in MergeTreeMarksLoader, which is reached on query reads. Part index-granularity loading reads marks directly: MergeTreeDataPartWide::loadIndexGranularity reads the first column's marks file (standalone existsFile + getFileSize/readFile), and MergeTreeDataPartCompact::loadIndexGranularity reads the "data" marks file via readFileIfExists. If the missing or vanishing file is the one selected for granularity, those loaders surfaced the old path-only / std::filesystem error before the helper ran. Extract the diagnostic into a shared throwIfMarksFileMissing() and call it from the error path of both loadIndexGranularity() callers (which hold the part's checksums, columns and name), so a missing granularity marks file yields the same diagnosable NO_FILE_IN_DATA_PART error. The helper runs on the error path only, so a successful load pays nothing, and wrapping the read in the caller also catches the file disappearing mid-read. 03810_missing_marks_file_error now also covers the index-granularity path: it removes the first column's marks file, reloads the table, and asserts the part becomes broken-on-start and the typed message reaches the log. Co-Authored-By: Claude Opus 4.8 <[email protected]>
The query-read case piped the matched error phrases through `sort -u`. `sort` collation depends on the active locale: in the C/POSIX locale the uppercase `NO_FILE_IN_DATA_PART` sorts before the lowercase message fragments (which is what the committed .reference was generated with), but on a UTF-8 locale (en_US.UTF-8, the CI runner default) dictionary collation case-folds and orders `does`/`is` before `NO_FILE...`, so the phrase came out last and the test failed the reference comparison deterministically on every UTF-8-locale runner (seen on the amd_llvm_coverage stateless check, 3/3 reruns). Drop `sort` and emit each expected phrase explicitly in a fixed order, so the output is independent of both locale and the order the phrases happen to appear in the error message. No .reference change is needed; the index-granularity case never used `sort` and is unchanged. Verified the test passes under LC_ALL=C, C.UTF-8 and en_US.UTF-8, and 8/8 repeated runs under en_US.UTF-8; confirmed the old `sort -u` form fails under en_US.UTF-8 while the new form passes. Co-Authored-By: Claude Opus 4.8 <[email protected]>
The flaky check fails ~1/N under DB-engine randomization to Ordinary, for two independent reasons, both in the index-granularity / cleanup paths the test exercises: 1. The text_log assertion filtered logger_name LIKE '%t_missing_granularity_marks %' with a trailing space. The storage logger name is StorageID::getNameForLogs(), which is 'db.table (uuid)' under Atomic but plain 'db.table' under Ordinary (no UUID suffix, no trailing space). So the trailing-space pattern matched under Atomic but missed under Ordinary, and count() returned 0 instead of 1. Drop the trailing space; the table name is still specific enough to skip the query's own 'executeQuery' log row (whose logger_name does not contain the table name). 2. The Case 1 'drop table t_missing_marks sync' streamed a CANNOT_UNLINK <Error> to client stderr under Ordinary: the part directory cleanup tries to unlink b.cmrk2, which the test removed. Atomic defers physical removal to a background task, so the synchronous drop is clean there, but Ordinary removes inline and logs the error at <Error>, which the runner (send_logs_level=error) treats as a stderr failure. Run that drop with --send_logs_level=none, the same mitigation already used on the Case 2 attach. No production code change; the diagnostic itself is unchanged. Co-Authored-By: Claude Opus 4.8 <[email protected]>
…nsions The flaky check failed the index-granularity case: under randomized settings the text_log assertion returned 0 while the part was still detached broken-on-start. Two independent fragilities, both fixed in the test only: 1. The text_log scan was unbounded against randomized read settings. system.text_log grows large under the flaky check (50x repeats under heavy load), so a randomized max_rows_to_read makes the count() query throw TOO_MANY_ROWS, and parallel-read / query-condition-cache / implicit-projection randomization can skew a count()>0 on a large system table. Pin the read: max_rows_to_read=0, max_bytes_to_read=0, max_threads=1, use_query_condition_cache=0, optimize_use_implicit_projections=0, and add an event_date>=yesterday() partition bound (kept alongside the precise event_time window; verified to retain "today" across timezones from UTC-10 to UTC+14). This is the same hardening 03096_text_log_format_string_args_not_empty.sh applies. 2. The marks-file removal loops only tried cmrk2/mrk2/mrk, missing non-adaptive compressed marks (.cmrk) produced when randomized index_granularity_bytes=0 with compress_marks=1. The loop now also covers .cmrk, so the intended marks file is always removed and the part is genuinely broken. Co-Authored-By: Claude Opus 4.8 <[email protected]>
ratio_of_defaults_for_sparse_serialization=0.0 was the actual cause of the
flaky-check / amd_debug-sequential failures (confirmed by ddmin: it reproduces
13/13 with that setting, 0/24 without, and all four failing CI runs carried
--ratio_of_defaults_for_sparse_serialization 0.0).
With sparse serialization a column gets a .sparse.idx substream; loadIndexGranularity
does not read the removed main marks file, so the missing file is caught later by the
checksum consistency check, which throws a typed FILE_DOESNT_EXIST naming the file (a
clean error, not the opaque std::filesystem one this PR removes) rather than the marks
loader's NO_FILE_IN_DATA_PART. The test asserted the marks-loader message, so it failed.
Pin ratio_of_defaults_for_sparse_serialization=1 so both tables keep dense per-column
marks and deterministically exercise the marks-loader path under test.
Also addresses the review note on the text_log filter: anchor logger_name on
currentDatabase() so it matches both Atomic ('db.table (uuid)') and Ordinary ('db.table')
and excludes a same-named table from another test's database in the server-wide text_log.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
The production change wraps both MergeTreeDataPartWide::loadIndexGranularity
and MergeTreeDataPartCompact::loadIndexGranularity with the typed
NO_FILE_IN_DATA_PART diagnostic, but 03810 only forced wide parts
(min_bytes/min_rows_for_wide_part = 0), so the compact loader was never
exercised. The compact path keeps all marks in a single "data" marks file and
reads it through a different API (readFileIfExists), so it needs its own
coverage for the PR's "all marks-read sites produce the enriched diagnostic"
contract.
Add a compact-part case: force a compact part with large
min_*_for_wide_part, guard that the part really is Compact, remove the single
"data" marks file (covering the .cmrk4 / .mrk4 / .cmrk3 / .mrk3 extensions),
re-attach the table, and assert the part is broken-on-start and the enriched
NO_FILE_IN_DATA_PART message reached system.text_log. The text_log filter is
anchored on currentDatabase() so it matches both Atomic ('db.table (uuid)')
and Ordinary ('db.table') logger names, and the read settings are pinned for
the same reasons as the wide case.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
f21bb21 to
f58ec14
Compare
|
Rebased onto current master (was conflicting). The only conflict was in Verified on the rebased branch (local debug build, build id a4f656c9): 03810_missing_marks_file_error passes 6/6 across {C, C.UTF-8, en_US.UTF-8} x {Atomic, Ordinary} and 12/12 repeated runs, stderr clean. The enriched diagnostic fires at all three marks-read sites (query read, wide and compact index-granularity loaders). Force-pushed f21bb21 -> f58ec14, so the bot's earlier inline-comment SHA anchors have shifted; all five prior review points remain addressed. |
| reader = std::make_unique<CompressedReadBufferFromFile>(std::move(buffer)); | ||
| try | ||
| { | ||
| auto buffer = data_part_storage->readFile(mrk_path, read_settings.adjustBufferSize(file_size), file_size); |
There was a problem hiding this comment.
This catch still misses the same missing-file race when use_reader_executor=1. Context::getReadSettings() propagates that setting into MergeTreeMarksLoader, and then ReadPipeline::build() returns a PipelineReadBuffer whose ReaderExecutor opens and reads the local file later from reader->readStrict(...), after this try block has already finished. A file that exists for getFileSize()/readFile() but disappears before the first actual read will therefore still surface the lower-level file-open/read exception instead of this NO_FILE_IN_DATA_PART diagnostic. Please keep the actual marks decoding (readStrict / readBinaryLittleEndian loop) under the same error conversion, or otherwise disable the reader-executor path for marks files, so the diagnostic covers the deferred-read path too.
There was a problem hiding this comment.
Confirmed on current master, and not fixed in this PR yet. Explaining why, since the answer is "the fix is easy, proving it is not".
Your reading of the path is right: ReadPipeline::tryBuildReaderExecutor still returns a lazy PipelineReadBuffer for a local marks file with no caches or async prefetch configured, that buffer opens nothing on construction, and the real open plus first read happen inside the mark-decoding loop. That loop is outside the try, so a file that vanishes between getFileSize and the first read surfaces the lower-level error rather than NO_FILE_IN_DATA_PART.
I implemented option (a) (wrap the decoding loop in the same conversion, builder and plain_marks staying in the enclosing scope so the post-decode builder->finish is unchanged) and it built clean. Then I mutation-tested it: reverted only that try/catch, rebuilt, confirmed the Build ID moved and that the server actually loaded the mutant, and re-ran 03810. The output was byte-identical and the test still passed.
So 03810 cannot currently prove the deferred catch. It removes the marks file before the query starts, so loadMarksImpl fails at its first getFileSize and the decoding loop is never reached. Isolating the deferred path needs the file to exist at sizing and be gone at the deferred open, which is a genuine TOCTOU: there is no pauseable failpoint anywhere in that read path today, so it needs new production failpoint plumbing plus concurrent-query orchestration.
Rather than ship a code change I cannot back with a test, I have dropped it from this PR and will land the failpoint and the fix together in a follow-up. This PR stays what its description claims: the eager-path diagnostic, plus the test.
This push is test-only. It fixes a real PR-caused failure the flaky check found: the CI merge-tree randomizer injects min_bytes_for_full_part_storage, and on a high draw choosePartFormat selects packed part storage, which bundles the whole part into one data.packed archive, leaving no separate marks file for the test to remove. That reproduced 5/5 on both amd_debug and amd_asan_ubsan. The test now pins min_bytes_for_full_part_storage = 0, which is the honest scope: it asserts a marks file listed in the checksums is missing on disk, a state that only exists in full part storage. 50/50 runs pass with the setting redrawn from the randomizer's own distribution each time, 13 of those draws being the packed-selecting maximum.
|
CI finished on
No PR-caused failures remain on this head. |
The CI merge-tree randomizer injects `min_bytes_for_full_part_storage` (`tests/clickhouse-test`, `threshold_generator(0.3, 0.3, 0, 512 MiB)`), and when it draws a value above the part size `MergeTreeData::choosePartFormat` selects `PartStorageType::Packed`. A packed part bundles every file into a single `data.packed` archive, so the part directory holds no separate `.cmrk2`/`.mrk2` marks file for the test to remove: the locator matched zero files, printed `NO MARKS FILE FOUND`, and the test exited 1. This was deterministic once the setting was drawn, not flaky: the flaky check reproduced it 5/5 on both `amd_debug` and `amd_asan_ubsan`. The test is specifically about a marks file that is listed in a part's checksums but missing on disk, which only exists in full part storage, so pin `min_bytes_for_full_part_storage = 0` on all three tables. An explicit per-DDL setting wins over the randomizer: `ClientBase::addMergeTreeSettings` only injects a setting when the `CREATE` query does not already set it.
A missing marks file raises a `NO_FILE_IN_DATA_PART` exception, which release builds handle normally, so "crashing with" was the wrong word for the behaviour this comment contrasts against.
Per the repository conventions, literal class and function names belong in inline code blocks, and a function is written as `f` rather than `f()`.
| const String & part_name, | ||
| const String & mrk_path) | ||
| { | ||
| if (data_part_storage.existsFile(mrk_path)) |
There was a problem hiding this comment.
throwIfMarksFileMissing is using data_part_storage.existsFile(mrk_path) as the source of truth, but that is only a metadata probe on object-storage-backed parts. DiskObjectStorage::existsFile delegates to metadata_storage->existsFile (src/Disks/DiskObjectStorage/DiskObjectStorage.cpp), and MetadataStorageFromPlainRewritableObjectStorage::existsFile just checks the local snapshot (src/Disks/DiskObjectStorage/MetadataStorages/PlainRewritable/MetadataStorageFromPlainRewritableObjectStorage.cpp).
If the marks blob is gone from S3/Azure while the part metadata still lists it, getFileSize still succeeds from metadata and the first real failure happens only on the later remote read. In that case this helper returns early and we still surface the lower-level storage exception instead of the new NO_FILE_IN_DATA_PART diagnostic, so the PR's storage-agnostic contract is still broken for object-storage MergeTree parts.
There was a problem hiding this comment.
Confirmed the chain by reading, with one correction to where the gap actually sits.
Verified: DiskObjectStorage::existsFile (DiskObjectStorage.cpp:245) delegates to metadata_storage->existsFile and never touches the object store, and MetadataStorageFromPlainRewritableObjectStorage::existsFile answers from FsSnapshot under a mutex (FsSnapshot.cpp:367). getFileSize is metadata too: the plain rewritable variant reads bytes_size out of that same snapshot, and MetadataStorageFromDisk::getFileSize is getTotalSize(readMetadata(path)->objects). readFile is lazy as well, since DiskObjectStorage::prepareRead only resolves getStorageObjects and the CompressedReadBufferFromFile constructor performs no read. So with the blob gone and the metadata intact, none of those three calls fails.
The correction: in that state throwIfMarksFileMissing is not returning early, it is never invoked. Both of its call sites are catch (...) handlers, one around getFileSize (MergeTreeMarksLoader.cpp:171) and one around readFile (:205). The first real reads are readStrict and readBinaryLittleEndian at :255, :263, :297 and :298, all outside both try blocks. Since neither guarded call throws, neither handler runs, so the probe never gets to answer. The defect is the placement of the conversion site, not the probe.
That makes this the same defect as the deferred read reported in the other thread, reached from a different carrier: the failure lands in the decoding loop, outside the try. Object storage does not add a second defect, it widens the carrier set from a local removal race to any part whose metadata outlives its blob.
One narrowing: the metadata implementations diverge, so "object-storage-backed parts" is wider than the evidence. MetadataStorageFromPlainObjectStorage::existsFile (Plain/MetadataStorageFromPlainObjectStorage.cpp:49) does call object_storage->exists, so for that variant the probe returns false and the existing conversion already fires. The snapshot-backed and local-metadata variants are the carriers.
New information relative to my other reply: this carrier is reproducible without the pauseable failpoint that blocked the local one. tests/integration/test_checking_s3_blobs_paranoid/test.py:797 already removes a blob with minio_client.remove_object while the metadata survives, and asserts the resulting error is the lower-level The specified key does not exist. This error happened for S3 disk, which is exactly the opaque shape this change set out to replace. So the fix and a test that can actually distinguish it are able to land together, which is what the follow-up covers. I am not pushing the code change here: per the no-speculative-changes rule it ships with the test that proves it, not ahead of it.
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered: 69/78 (88.46%) · Uncovered code |
CI finish ledger - 5fdff6aEvery failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
All four flavours of the Session id: cron:our-pr-ci-monitor:20260729-093000 |
The previous run on this head reported 174 checks with 172 of them skipped: the Config Workflow job could not reach the CI database, timed out, and praktika then dropped every dependent job. No test ever executed, so the run carried no signal about this branch. This commit changes nothing. Its tree is byte identical to its parent and it exists only to raise a fresh pull_request synchronize event. I add it on top rather than amending or rebasing, because the parent is a maintainer's signed merge commit and rewriting it would drop that merge parent.
Resolves the conflict in `MergeTreeDataPartCompact::loadIndexGranularity` introduced by master's shared-part-schema refactor. Master moved the part schema behind accessors: the raw `columns` member is now reached through `getColumns`, and `columns_substreams` became a `shared_ptr` reached through `getColumnsSubstreams`. Both sides of the conflict call `loadIndexGranularityImpl` with the same arguments; only the spelling of the column accessors differs. The resolution keeps this branch's `try`/`catch` wrapper and adopts master's accessor spelling inside it. `MergeTreeDataPartWide::loadIndexGranularity` merged without a textual conflict but needed the same adaptation: the `throwIfMarksFileMissing` call this branch added still passed the removed `columns` member, which no longer compiles, so it now passes `getColumns` as well. A merge is used rather than a rebase: the previous head is a maintainer commit and the repository guidance is to add new commits rather than rewrite history. Co-Authored-By: Claude Opus 5 <[email protected]>
`03810_missing_marks_file_error.sh` deletes a marks file out of a live part directory. Master now forbids that in stateless tests: the `server_data_manipulation_in_stateless_tests` style check, added in `e1fc810cb6803de`, rejects a stateless `.sh` test that resolves a server-side path from a system table and then runs a file-modifying command, because stateless tests run against arbitrary server configurations (object storage, shared MergeTree, encrypted disks). The check's companion sweep converted the other offenders to integration tests; this test predates the check and escaped it only because the branch was not merged. The three cases move over unchanged in substance, one per production call site the diff touches: the query read path through `MergeTreeMarksLoader`, and the index-granularity load path for wide and for compact parts. A single plain local-disk node replaces the original's `no-object-storage`, `no-shared-merge-tree` and `no-replicated-database` tags, and also its `no-parallel` tag, which was only needed because `SYSTEM DROP MARK CACHE` is server-wide. Both load-path cases assert on `system.text_log` rather than only on `system.detached_parts.reason`: `reason` is `broken-on-start` whether the load failed with the typed diagnostic or with the opaque `std::filesystem` error, so it cannot separate the two. Verified in both directions. With the change, the three cases pass. With only the four production files reverted to master and the tests left untouched, all three fail, and each fails on its own assertion: the read path reports `Code: 1001 ... std::filesystem::filesystem_error: in file_size: No such file` instead of `NO_FILE_IN_DATA_PART`, and both load paths find no matching `text_log` row. Co-Authored-By: Claude Opus 5 <[email protected]>
The converted test checked the exception name and a few generic phrases, so it would still have passed if the part name, the missing marks file, the columns, the checksums listing or the on-disk listing had been dropped from the message. Those fields are the entire point of the change, so each case now asserts them. The marks file is asserted together with its `Marks file '...'` prefix. The bare name is not enough: it also appears in the `Checksums files:` listing later in the same message, where its presence says nothing about which file was reported missing. Each case asserts the marks file its own production path is expected to resolve: `b` for the query read path, which reads only that column, the first column `a` for the wide index-granularity path, and the single `data` marks file for the compact one. That last assertion is what pins the compact case to `MergeTreeDataPartCompact::loadIndexGranularity`, since the wide path would have named a per-column marks file instead. Two mechanics the earlier version got wrong. A load failure is logged both as the diagnostic and again wrapped in the broken-part report, so selecting one row by recency can pick the wrapper; all matching rows are now joined before asserting. And a message read back out of `system.text_log` arrives escaped, so the quote escaping is undone first, which lets the same assertions serve both a logged message and a client-side error string. Re-verified in both directions: three pass with the change, and all three fail with only the four production files reverted to master. Co-Authored-By: Claude Opus 5 <[email protected]>
Asserting only the `Checksums files:` and `Files on disk:` labels left their contents unchecked, so the listings could have been empty, truncated or built from the wrong part and the test would still have passed. Each case now asserts that the missing marks file appears in the checksums listing, that it does not appear in the on-disk listing, and that the stream's surviving `.bin` data file does. Those three together are the diagnostic's actual claim: the part's checksums expect a file that is not there, while the rest of the part is intact. The `.bin` assertion is what keeps the on-disk listing pinned to the part's real contents rather than to an empty list. Re-verified in both directions with the same two binaries: three pass with the change, and all three fail against a build with only the four production files reverted to master. Co-Authored-By: Claude Opus 5 <[email protected]>
|
Merged master, and moved this PR's test into Why no CI has run here since July: the branch had been conflicting since 2026-08-04, and while it conflicted GitHub could not compute I merged master rather than rebasing, so the two existing master merges in this branch stay in the history. The only textual conflict was in The stateless test Verified in both directions. The three cases pass, and against a build with only the four production files reverted to master all three fail: the read path on the original |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Object file sizes6 object files changed (+27.72 KiB total), 0 added.
716 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only Compile time of recompiled translation units291 translation units recompiled, 2869 s compile time in total, 291 of them have a recent master baseline. |
CI finish ledger - 6ac8edeEvery failure below has an owner: a fixing PR (mine or external), or a full-effort fix task whose
Nothing else failed: 174 check-runs, 146 success / 25 skipped, and the praktika tree is 172 nodes with For the record, and so a later pass does not re-link it: my merged #116782 ("Reserve host memory for Session id: cron:our-pr-ci-monitor:20260906-000110 |
|
Fixing PR for the |
CI finish ledger - 6ac8ede (owner update)The fixing PR I named for this head on 09-06, #118365, is closed unmerged, so those two rows need a new owner. Re-measured from this run's own
Two corrections to that 09-06 note, since I was the one who overstated it:
#118467 bounds the path-glob expansion measured on the sibling head of this descriptor; this run's |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Improved the error message when a marks file that is listed in a data part's checksums is missing on disk. Reading such a column, or loading the part's index granularity, now raises
NO_FILE_IN_DATA_PARTnaming the part, the missing file and the part's on-disk state, instead of an opaquestd::filesystemfile_size: No such file or directoryerror.Description
MergeTreeMarksLoader::loadMarksImplderives the marks file path from the part's own checksums (getStreamNameForColumnonly returns a stream name listed there), so the file is expected to exist. When it does not, the read fails withCode: 1001 ... std::filesystem::filesystem_error: in file_size: No such file or directory, which names neither the affected part nor its on-disk state.This surfaces in the flaky integration test
test_rename_column::test_rename_distributed_parallel_insert_and_select(Integration tests, amd_tsan; report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=100703&sha=e93ea3312f0d1107b3977560deafaa4241bd89b7&name_0=PR&name_1=Integration%20tests%20%28amd_tsan%2C%201%2F6%29 ) under concurrentRENAME COLUMN+INSERT+SELECT. CIDB showed it on 3 unrelated PRs over 30 days and never on master: a rare concurrency window, not one PR's regression.This PR does not fix that race, which does not reproduce locally (94/94 idle and CPU-jittered iterations passed). It makes the next occurrence diagnosable: the marks read is wrapped in
try/catchand, when the marks file turns out to be genuinely absent, the failure is rethrown asNO_FILE_IN_DATA_PART. The check runs on the error path only, so a successful load pays nothing. The index-granularity load path gets the same treatment, for wide and for compact parts.tests/integration/test_missing_marks_filecovers one case per call site: the query read path, and the index-granularity load path for wide and for compact parts. It is an integration test because it deletes a marks file from a live part, which stateless tests may not do. Verified in both directions: with only the four production files reverted to master, all three cases fail, the read path on theCode: 1001message and both load paths on the diagnostic being absent fromsystem.text_log.Workflow [PR]
Sync PR [sync-upstream/pr/107150]