Skip to content

Fix Paimon background refresh crash on concurrent LATEST hint rewrite - #107134

Closed
groeneai wants to merge 46 commits into
ClickHouse:masterfrom
groeneai:fix-paimon-latest-hint-concurrent-read-crash
Closed

groeneai wants to merge 46 commits into
ClickHouse:masterfrom
groeneai:fix-paimon-latest-hint-concurrent-read-crash

Conversation

@groeneai

@groeneai groeneai commented Jun 11, 2026 •

Copy link
Copy Markdown
Collaborator

Changelog category (leave one):

  • Critical Bug Fix (crash, data loss, RBAC)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Fixed a server crash (failed assertion file_offset_of_buffer_end <= getFileSize()) when reading a Paimon table whose snapshot/LATEST hint file is concurrently rewritten by a Paimon writer. The background metadata refresh now reads the hint atomically. For a Paimon table using incremental read whose Keeper state was written before this change, the first read after upgrading re-emits the current snapshot once, after which the state is marked and reads are incremental again.

Description

PaimonTableClient::getLatestTableSnapshotInfo() read the snapshot/LATEST hint file through createReadBuffer(), which under the default remote-filesystem prefetch settings builds an AsynchronousBoundedReadBuffer. That buffer caches the file size at construction and asserts file_offset_of_buffer_end <= getFileSize() in nextImpl().

LATEST is the only mutable object in a Paimon table: an external writer atomically rewrites it on every commit. When the file is rewritten to a longer value (e.g. snapshot id 9 -> 10) between the buffer capturing the size and the prefetch completing, the read passes the stale cached size and the assertion aborts the server. It fires on the background metadata refresh thread (runBackgroundRefresh -> update -> loadLatestState), so the surrounding try/catch does not catch it (chassert routes through abortOnFailedAssertion, not a C++ exception).

This is the chronic test_paimon_incremental_read flake on sanitizer builds (amd_msan / amd_asan_ubsan), where slower execution widens the race window.

Fix: read the hint with readSmallObjectAndGetObjectMetadata() (a single atomic small-object read with no cached-size invariant), mirroring how Iceberg reads its version-hint.text. The other createReadBuffer() uses in PaimonClient read write-once immutable files (snapshot-N, schema-N, manifests) and are unaffected.

Added gtest_paimon_latest_hint which rewrites the hint concurrently while reading: it aborts on the old code and passes on the fix.

Crash provenance: CIDB STID family from Integration tests (amd_msan, 1/6), e.g. report https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=106177&sha=39b1915c82cf7e393efb4247e1c8f4f97b5b8e72&name_0=PR&name_1=Integration%20tests%20%28amd_msan%2C%201%2F6%29 — stack: AsynchronousBoundedReadBuffer::nextImpl -> readStringUntilEOF -> PaimonClient.cpp:178 getLatestTableSnapshotInfo.

Follow-up commits extended the same treatment to the other metadata objects that are mutable in place across a supported external DROP + re-CREATE at a reused path (schema-0, snapshot-N): they are read via readMutableMetadataJSON (plain readObject, ETag-pinned on S3 under s3_validate_etag_on_read), so a concurrent rewrite surfaces as a normal exception instead of an abort or torn bytes. Per review, the LATEST hint read is ETag-pinned the same way (makeEtagPinnedStoredObject), so a rewrite between retried S3 requests throws S3_OBJECT_CHANGED_DURING_READ and falls back to snapshot listing instead of splicing two hint generations. Per review, incremental read then fails closed on those exceptions: getSnapshotsBetween probes the snapshot object's existence after a failed load and rethrows if the file still exists, so the Keeper watermark only advances past snapshots genuinely removed by Paimon compaction (PaimonMetadata::isSnapshotLoadFailureSkippable, covered by PaimonIncrementalRead.SkipsOnlyGenuinelyMissingSnapshots). Per review, the watermark commit itself is also identity-guarded: an external recreate that starts after the initial identity check can delete old snapshot-N files mid-scan (indistinguishable from compaction gaps for the existence probe), so iterate re-runs validateTableIdentity after collectIncrementalDataFiles and before setCommittedSnapshot — a recreate rewrites schema-0 (its timeMillis changes), the re-validation throws, and the old table's progress is never persisted under the reused keeper_path.

Per review, the query-level targeted read (paimon_target_snapshot_id) closes the same window: snapshot-N lives at a path a recreate reuses and snapshot numbering restarts from 1 in the new table, so iterate re-validates the table identity right after loadStateForSnapshot(target_snapshot_id) and before collectDeltaFilesForSnapshot consumes it, instead of serving the recreated table's files under the old ClickHouse table (PaimonIncrementalRead.DetectsRecreateOnReusedTargetSnapshotPath).

Per review, the committed incremental-read watermark is finally tied to the table generation rather than being a bare snapshot id. An external DROP is not atomic, so it can remove old snapshot-N files while schema/schema-0 is still the old one; at the point the watermark is committed that is indistinguishable from a Paimon compaction gap (the existence probe sees a missing file, the pre-commit validateTableIdentity sees the unchanged old timeMillis), so the skip path cannot be tightened there. Instead PaimonStreamState::setCommittedSnapshot records the generation (schema-0 timeMillis) in a committed_table_identity node in the same Keeper transaction as committed_snapshot, and PaimonMetadata::getCommittedSnapshotId discards a watermark whose recorded generation no longer matches (PaimonMetadata::isCommittedWatermarkFromSameTable), so a re-CREATE at the same path reusing the same keeper_path reads the new table from its first snapshot instead of skipping its first snapshots. A watermark written before generation tracking carries no marker and keeps the previous behaviour, recording the marker on its next commit. Covered by PaimonIncrementalRead.DiscardsWatermarkFromAnEarlierTableGeneration, which deletes snapshot-N before changing schema-0 and then walks the recreate.

Per review, the generation pin is no longer S3-only. readMutableMetadataJSON and readSmallObjectAndGetObjectMetadata are shared by Azure-backed tables, and AzureObjectStorage::readObject built ReadBufferFromAzureBlobStorage with no expected ETag, so a rewrite of LATEST, schema-0 or snapshot-N between retried downloads could still splice two generations into one logical read instead of throwing — the fail-closed logic above would then accept mixed metadata on Azure while S3 correctly reported S3_OBJECT_CHANGED_DURING_READ. ReadBufferFromAzureBlobStorage now takes an expected ETag and, when it is set, pins every Download (initial download, in-buffer retries, and readBigAt) to that generation with If-Match, maps the resulting 412 Precondition Failed to S3_OBJECT_CHANGED_DURING_READ, validates the ETag reported by the download response (covering endpoints that ignore the condition header), and never retries a detected generation change. AzureObjectStorage::readObject passes StoredObject::etag through, and makeEtagPinnedStoredObject fetches the ETag for Azure as well. Covered by 04655_azure_read_etag_validation, which mirrors the S3 test through a new azure_read_inject_etag_mismatch failpoint.

Per review, the Azure generation pin also applies on the cluster path. StorageObjectStorageCluster::getTaskIteratorExtension builds its iterator with skip_object_metadata=true, so a cluster worker receives an ObjectInfo whose metadata is a placeholder with an empty etag; the placeholder refresh in StorageObjectStorageSource::createReader was gated on ObjectStorageType::S3, so on azureBlobStorageCluster the ETag stayed empty and ReadBufferFromAzureBlobStorage silently skipped the new If-Match and response-ETag checks even with s3_validate_etag_on_read=1. The refresh now covers ObjectStorageType::Azure too, so the cluster path validates the generation exactly like the non-cluster path. A real metadata fetch that merely lacks an ETag still has is_fetched=true and is left alone, so no additional GetProperties request is issued for it.

Per review, an incremental-read watermark that carries no generation marker is no longer taken at face value. Such a watermark was written before generation tracking existed, so the generation it belongs to is unknown: it may be this table's own progress, or progress inherited from a table externally dropped and re-CREATEd at the same path. It used to be trusted on the assumption that the marker would be recorded on the next commit, but the committed_snapshot_id >= state->snapshot_id branch of collectIncrementalDataFiles returns before setCommittedSnapshot, so an inherited watermark ahead of the recreated table's latest snapshot never got a marker and the table stayed silently skipped until it passed that watermark. PaimonMetadata::isCommittedWatermarkFromSameTable now discards an unmarked watermark: trusting it is the only direction that can skip data, discarding it re-reads (fail-close), and it forces the initial-read branch, which always commits a watermark together with the marker — so this happens at most once per table, whether or not that first batch had new snapshots to read.

Note on overlap: the minimal LATEST-hint fix landed on master meanwhile as #112010, so the master merge here resolves the two resulting conflicts in favour of what is already merged. getLatestTableSnapshotInfo keeps master's readSmallObjectAndGetObjectMetadata call, its 64-byte cap and its buffer-size floors, with only the ETag pin carried over from this branch; gtest_paimon_latest_hint.cpp is taken from master verbatim, and this branch's tests for the other mutable metadata objects (schema-0, snapshot-N) and for the incremental-read guards moved to a new gtest_paimon_mutable_metadata.cpp (the two hint tests master's file now duplicates were dropped). What remains unique to this PR is the mutable-metadata / ETag-pinning and incremental-read-watermark scope described above.

Related: #112010

The CH Inc sync report for the previous head exposed a real defect in the Azure pin, now fixed: Azure reports the same ETag in two spellings — ListBlobs reads it from the XML body of the response, while every single-blob request (GetProperties, Download) reads it from the HTTP header, where RFC 7232 requires the opaque tag to be quoted. A StoredObject whose ETag came from a listing therefore carries the unquoted form while Download returns the quoted one, so comparing the raw strings made every read of a listed Azure blob look like a concurrent rewrite (and If-Match was sent with an unquoted, invalid opaque tag). That failed the Azure glob, AzureQueue and Azure-disk tests and 04655_azure_read_etag_validation in the private report. Both the comparison and the If-Match header now use the opaque tag only: the weak-validator prefix and the surrounding quotes are stripped before comparing, and the header is always sent quoted. Azurite is not reachable from the development environment, so this is verified by CI rather than locally.

Per review, the Azure ETag test now also covers the cluster path: two azureBlobStorageCluster cases mirror the s3Cluster half of 04339_s3_read_etag_validation — a plain one and one with cluster_table_function_split_granularity = 'bucket' — both with an explicit structure so schema inference cannot read the blob on the coordinator first, so S3_OBJECT_CHANGED_DURING_READ can only appear if the worker refreshes the skip_object_metadata placeholder's empty StoredObject::etag before reading.

Per review, the watermark-generation fix is now also proven end-to-end through the real Keeper-backed iterate → setCommittedSnapshot → getCommittedSnapshotId flow rather than only through helper-level gtests. test_paimon_incremental_read/test.py::test_paimon_discards_watermark_after_external_recreate keeps a fixed paimon_keeper_path (deliberately not {uuid}-based, so it survives a DROP of the ClickHouse table), advances the committed watermark on the first table generation, externally drops and recreates the Paimon table at the same location, re-creates the ClickHouse table at the same keeper path, and proves the first incremental read returns the recreated table's rows instead of inheriting the old generation's watermark and returning no rows forever; a second read then returns nothing, showing the discarded watermark was re-latched to the new generation. Verified locally against a real Keeper and the dockerized Paimon writer.

Per review, the paimon_target_snapshot_id recreate guard is now proven end-to-end rather than only through its prerequisite invariant. A new pauseable failpoint paimon_iterate_pause_before_target_snapshot_load holds a targeted read in the exact window the guard closes — between the identity check at the top of iterate and loadStateForSnapshot — and test_paimon_incremental_read/test.py::test_paimon_targeted_read_fails_closed_on_external_recreate lands an external DROP + re-CREATE inside it, then asserts the resumed read fails closed with the "was recreated" error instead of serving the recreated table's snapshot-1 under the old ClickHouse table; if the re-validation after the load were removed, the read would return the new generation's rows and the test would fail. Making that observable exposed that validateTableIdentity threw LOGICAL_ERROR, which aborts the server in debug and sanitizer builds (Exception::handleErrorCode) — the fail-close guard for an external recreate was itself a crash there; it now throws INCORRECT_DATA (the code PlainRewritable uses for a concurrently recreated directory). Verified locally against the real dockerized Paimon writer.

PaimonTableClient::getLatestTableSnapshotInfo() read the snapshot/LATEST
hint file through createReadBuffer(), which under the default remote_fs
prefetch settings builds an AsynchronousBoundedReadBuffer. That buffer
caches the file size at construction (impl->getFileSize()) and asserts
file_offset_of_buffer_end <= getFileSize() in nextImpl().

The LATEST hint is the only mutable object in a Paimon table: an external
writer atomically rewrites it on every commit. When the file is rewritten
to a longer value (e.g. snapshot id 9 -> 10) between the buffer capturing
the size and the prefetch completing, the read passes the stale cached
size and the chassert aborts the server. It fires on the background
metadata refresh thread (runBackgroundRefresh -> update -> loadLatestState),
so the surrounding try/catch does not help: chassert routes through
abortOnFailedAssertion, not a C++ exception.

This is the chronic test_paimon_incremental_read flake on sanitizer builds
(amd_msan / amd_asan_ubsan), where the slower execution widens the race.

Read the hint with readSmallObjectAndGetObjectMetadata() instead, a single
atomic small-object read with no cached-size invariant. This mirrors how
Iceberg reads its version-hint.text file. The other createReadBuffer() uses
in PaimonClient read write-once immutable files (snapshot-N, schema-N,
manifests) and are unaffected.

Adds a unit test (gtest_paimon_latest_hint) that rewrites the hint
concurrently while reading; it aborts on the old code and passes on the fix.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@groeneai

Copy link
Copy Markdown
Collaborator Author

Pre-PR validation gate

# Question Answer
a Deterministic repro? Yes. A unit test (gtest_paimon_latest_hint.ConcurrentHintRewriteDoesNotCrash) rewrites snapshot/LATEST between "1" and "10" in a tight loop while calling getLatestTableSnapshotInfo(). On the unmodified code it aborts every run (GTEST_EXIT=134); on the fix it passes 5/5 repeats (60k reads).
b Root cause explained? Yes. getLatestTableSnapshotInfo() read LATEST via createReadBuffer(), which builds an AsynchronousBoundedReadBuffer (default remote_filesystem_read_prefetch=1). That buffer caches getFileSize() at construction and asserts file_offset_of_buffer_end <= getFileSize() in nextImpl(). A concurrent Paimon writer atomically rewrites LATEST to a longer value (snapshot id crossing a digit boundary); the prefetch then reads past the stale cached size and aborts. It runs on the background refresh thread, so the try/catch can't catch it (chassert -> abortOnFailedAssertion, not an exception). Sanitizer builds widen the race -> the chronic test_paimon_incremental_read msan/asan flake.
c Fix matches root cause? Yes. The hint is now read with readSmallObjectAndGetObjectMetadata() — a single atomic small-object read with no cached-size invariant, so the assert path is unreachable for this file. Mirrors the established Iceberg version-hint.text read. Not a symptom guard.
d Test intent preserved / new tests added? New gtest_paimon_latest_hint added (3 tests: direct hint read, stale-hint fallback, concurrent-rewrite crash regression). No existing test weakened.
e Both directions demonstrated? Yes. Local debug unit_tests_dbms: old code aborts with the exact CI stack (AsynchronousBoundedReadBuffer::nextImpl -> readStringUntilEOF -> PaimonClient.cpp getLatestTableSnapshotInfo); fixed code passes 5/5 repeats.
f Fix is general, not a narrow patch? Yes. LATEST is the only mutable file in a Paimon table; the other createReadBuffer() calls in PaimonClient read write-once immutable files (snapshot-N, schema-N, manifests) and cannot hit this race, so they are intentionally unchanged. EARLIEST is defined but never read. The root cause is fixed at the read site, not guarded at the crash site.

Session id: cron:clickhouse-worker-slot-18:20260611-014800

@groeneai

Copy link
Copy Markdown
Collaborator Author

cc @divanik @kssenii — could you review? This fixes the chronic test_paimon_incremental_read crash on msan/asan: the Paimon background refresh read snapshot/LATEST through createReadBuffer (async buffer caches the file size and asserts in nextImpl when a concurrent writer rewrites the hint). Switched to an atomic readSmallObjectAndGetObjectMetadata, mirroring the Iceberg version-hint.text read. cc @Binnn-MX as the Paimon engine author.

@PedroTadim PedroTadim added the can be tested Allows running workflows for external contributors label Jun 11, 2026
@clickhouse-gh

clickhouse-gh Bot commented Jun 11, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [2aba6bd]

Summary: ✅


AI Review

Summary

This PR hardens Paimon mutable-metadata reads against concurrent rewrites (LATEST, schema-0, snapshot-N), extends generation-pinned read validation to Azure and the cluster path, and ties incremental-read watermarks to the underlying table generation. The concurrency and fail-close mechanics look coherent, and the new gtests/integration coverage are strong. The remaining concern is a deliberate upgrade-time compatibility change for legacy incremental readers.

Findings

⚠️ Majors

  • [src/Storages/ObjectStorage/DataLakes/Paimon/PaimonMetadata.cpp:699-748] [dismissed by author -- https://github.com/Fix Paimon background refresh crash on concurrent LATEST hint rewrite #107134#discussion_r3733033350] Discarding every pre-committed_table_identity watermark makes the first incremental read after upgrade replay the current snapshot in full for every existing Paimon incremental table, even when the upstream table was never recreated. That is a real change to the documented at-most-once contract for already-deployed tables. The new docs and changelog now describe it correctly, but the upgrade still has no compatibility or migration path beyond accepting the one-time duplicate delivery.
Final Verdict

The implementation looks solid apart from that intentional compatibility tradeoff. I would treat the legacy-watermark replay as a real Major that maintainers may still choose to accept, but I did not find a new inline code bug to post on the diff.

LLVM Coverage Report

Metric Baseline Current Δ
Lines 86.60% 86.60% +0.00%
Functions 91.90% 91.90% +0.00%
Branches 78.90% 78.90% +0.00%

Changed lines: Changed C/C++ lines covered: 396/449 (88.20%) · Uncovered code

Full report · Diff report

@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label Jun 11, 2026
The ConcurrentHintRewriteDoesNotCrash test kept the producer as a raw
std::thread joined only at end of scope. If an ASSERT_* failed and
returned early, or getLatestTableSnapshotInfo threw, the still-joinable
writer destructor would call std::terminate, turning a plain test
failure into a process abort. That hides the crash-vs-clean distinction
this regression test exists to make.

Join via SCOPE_EXIT so the writer is stopped and joined on every exit
path (early return, exception, normal fall-through) before its
destructor runs, and drop the now-redundant end-of-scope join.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@groeneai

Copy link
Copy Markdown
Collaborator Author

CI finished on HEAD `81203d2dca40`. The only red is `AST fuzzer (amd_msan)` with Logical error: Trying to get name of not a column: A (STID: 2310-3993). That is a pre-existing chronic trunk AST-fuzzer finding, not caused by this PR: the broader 2310-* "not a column" family has hit 35 distinct PRs (56 hits) plus 5 master runs in the last 30 days, and this PR only touches Paimon DataLake code (src/Storages/ObjectStorage/DataLakes/Paimon/), which is unrelated to the analyzer matcher path that throws. The gtest writer thread was made RAII-safe per the earlier review. Ready for review.

@groeneai

Copy link
Copy Markdown
Collaborator Author

CI summary, covered HEAD 81203d2d

CI fully finished (run=0, aggregator complete, >7h buffer). The single failure is a non-PR-caused chronic trunk bug; the Paimon LATEST-hint read fix is not implicated.

Check Failure Classification Disposition
AST fuzzer (amd_msan) Logical error: Trying to get name of not a column: ExpressionList (STID 2310-3993) Chronic trunk analyzer bug (getColumnName on a non-column, fuzzed multiIf(*, ...)) NOT PR-caused (5 hits / 5 distinct unrelated PRs / 30d). Unrelated to a Paimon storage readSmallObject change. Tracked under the STID 2310 "Trying to get name of not a column" family (fix PR #106647 in flight).

No PR-caused failures. The fix (Paimon background-refresh crash on concurrent LATEST hint rewrite; gtest regression) is unaffected.

…int-concurrent-read-crash

# Conflicts:
#	src/Storages/ObjectStorage/DataLakes/Paimon/PaimonClient.cpp
@alexey-milovidov alexey-milovidov self-assigned this Jul 17, 2026
@alexey-milovidov
alexey-milovidov requested a review from nauu July 17, 2026 14:41
Clarify why PAIMON_MAX_HINT_FILE_SIZE is 10 MiB: the snapshot LATEST/EARLIEST
hint holds a single version integer (a few bytes); the cap only bounds the
single-shot read and matches Iceberg's existing version-hint cap.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@clickhouse-gh clickhouse-gh Bot added pr-critical-bugfix pr-must-backport Pull request should be backported intentionally. Use this label with great care! and removed pr-bugfix Pull request with bugfix, not backported by default labels Jul 19, 2026
The ConcurrentHintRewriteDoesNotCrash regression only reproduces when the
hint read goes through createReadBuffer's AsynchronousBoundedReadBuffer,
which is selected by remote_filesystem_read_method=threadpool +
remote_filesystem_read_prefetch=1. The test previously inherited those from
the global defaults, so a future default change could keep it green even if
getLatestTableSnapshotInfo were switched back to createReadBuffer. Set both
explicitly on a copied Context before constructing PaimonTableClient so the
repro stays tied to the failure mode.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@groeneai

Copy link
Copy Markdown
Collaborator Author

CI finish ledger — 6706761

Every failure below has an owner: a fixing PR (ours or external), or a full-effort fix task whose fixing-PR link will be posted here when it opens. Only CH Inc sync is exempt.

Check / test Reason Owner / fixing PR
Integration tests (amd_tsan, 3/6) / test_replicated_database::test_replicated_table_structure_alter flaky (484 PRs / 100 master / 30d; Replicated-DB DDL-recovery race, unrelated to this Paimon PR) #110030 (ours, open)

Not PR-caused: this PR touches only Paimon DataLake code; the failing test is a chronic Replicated-database recovery flake.

Session id: cron:our-pr-ci-monitor:20260719-233000

getTableSchemaJSON and getSnapshot read schema-0 / snapshot-N through
createReadBuffer, which wraps small objects in AsynchronousBoundedReadBuffer.
That buffer caches the file size at open and aborts (chassert
file_offset_of_buffer_end <= getFileSize() in nextImpl) if a later read
passes that size, on both the async-prefetch and distributed-cache paths.
schema-0 and snapshot-N sit at fixed reused paths that a supported external
DROP + re-CREATE rewrites in place: validateTableIdentity reads schema-0 on
every background refresh to detect exactly that, and loadLatestState reads
the snapshot just before it. A recreate that grows either object mid-read
could hit the same server abort the LATEST-hint fix already removed.

Add readMutableMetadataJSON() and route both reads through it. It uses
object_storage->readObject(), which returns the plain per-backend read
buffer and is never wrapped in AsynchronousBoundedReadBuffer, so the
cached-size chassert is unreachable on every path. ETag pinning is preserved
(HEAD to capture the ETag, gated on s3_validate_etag_on_read for S3, so an
in-place overwrite mid-read is reported as S3_OBJECT_CHANGED_DURING_READ),
and the JSON is streamed uncapped. Manifest reads keep createReadBuffer:
their filenames are unique per write, so they are not reused in place across
a recreate.

Add ConcurrentSchemaZeroRewriteDoesNotCrash and
ConcurrentSnapshotRewriteDoesNotCrash covering the concurrent-grow reads.
@groeneai

Copy link
Copy Markdown
Collaborator Author
Internal review trail (schema-0 / snapshot-N fix) — click to expand

Second-model review adjudication for commit d42c21c (5 rounds, all findings resolved):

  • 10 MiB cap on schema reads (blocker) -> AGREE. An early attempt used a small-object read with a 10 MiB cap; copyDataMaxBytes throws over it, which could fail table creation on a large schema and, via getSnapshotsBetween's catch(...), silently skip a snapshot and advance the watermark. Dropped the cap.
  • Missing ETag pinning (blocker) -> AGREE. A plain readObject(StoredObject(path)) dropped the If-Match guard createReadBuffer provides. Restored: HEAD for the ETag, pin it on the StoredObject gated on s3_validate_etag_on_read for S3.
  • Distributed-cache path still wrapped in the async buffer (blocker) -> AGREE. use_async_buffer = use_prefetch || use_distributed_cache, so merely disabling prefetch left the assertion reachable under distributed cache. Final fix reads via readObject, which is never wrapped in AsynchronousBoundedReadBuffer on any path (verified: 0 buffer constructions for the schema read under an instrumented ASan build).
  • Snapshot sibling read (blocker) -> AGREE. getSnapshot shared the same vulnerability for snapshot-N; routed it through the same helper and added a regression test. Manifest reads excluded (unique per-write names, not reused in place).
  • Test rigor / verbose comments (major/nit) -> AGREE. Test now also requires a valid post-writer read (rejects an always-throwing impl); comments trimmed to the invariant.

Both directions verified: on an instrumented ASan build the pre-fix createReadBuffer path aborts at the file_offset_of_buffer_end <= getFileSize() assertion under a forced concurrent grow; the fix reads without the async buffer and passes. Debug + ASan: all PaimonLatestHint.* pass.

Session id: cron:clickhouse-maint-slot-10:20260722-060300

groeneai and others added 3 commits July 22, 2026 08:59
The two intentional catch (...) blocks in the schema-0 / snapshot
concurrent-rewrite tests swallow the torn-read parse exception on
purpose: the tests assert only that the process does not abort. Add
an 'Ok' comment inside each block so check_style's catch_all rule
does not flag them. Comment-only, test behavior unchanged.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
The two writer-race catch blocks in gtest_paimon_latest_hint.cpp carry an
'Ok' comment (accepted by check_style) but empty bodies, which clang-tidy
bugprone-empty-catch rejects (a comment is not a statement), failing
Build (arm_tidy). Add // NOLINT(bugprone-empty-catch) on each catch line,
the established house-style annotation for intentional empty catches, so
both check_style and clang-tidy pass. The swallow is intentional: a torn
read of a concurrently-rewritten schema-0/snapshot yields a normal parse
exception; the test only asserts the process does not abort.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
The concurrent-rewrite regression tests only aborted the pre-fix binary by
winning a TOCTOU race (a writer growing the object between the async buffer's
size capture and its read), which is too narrow to fire reliably. Bugfix
validation builds the merge-base binary with these tests overlaid and requires
at least one to fail there; the race did not, so it reported "failed to
reproduce the bug".

Assert the deterministic invariant behind the fix instead: a mutable-metadata
read must not be wrapped in AsynchronousBoundedReadBuffer, whose file size is
cached at open and whose nextImpl chassert aborts when a concurrent recreate
grows the object mid-read. ProfileEvents::RemoteFSBuffers is incremented only by
that buffer's constructor, so a single clean read adds one before the fix
(createReadBuffer selects the async buffer for a small object under
threadpool+prefetch) and none with it (readObject/readSmallObjectAndGetObjectMetadata).
Read the counter through an isolated ThreadGroup, mirroring
gtest_reader_executor_metric.cpp.
groeneai and others added 2 commits July 31, 2026 18:53
The hint is trusted only when snapshot-N is present and snapshot-N+1 is absent,
but both halves used IObjectStorage::exists, which answers two states.
HDFSObjectStorage::exists is 0 == wrapErr(hdfsExists, ...) and wrapErr inspects
errno only to retry a krb5 kinit, so any libhdfs failure (NameNode down, auth,
network) collapses to false. For the second probe that reads as "no next
snapshot", the stale hint is accepted, and the read serves an older snapshot
while newer data exists. Only the second probe is affected: a fail-open false
from the first one makes the fast path fall through, which is already safe.

tryGetObjectMetadata answers three states: an empty optional only for a definite
absence, a throw when the backend could not tell. On HDFS its absence path goes
through hdfsGetPathInfo, which does map FileNotFoundException to ENOENT, so the
distinction is available there and not in hdfsExists. This is the same primitive
the incremental-read probe in PaimonMetadata already uses.

An unanswerable probe falls through to the snapshot listing rather than
propagating. The listing is authoritative and fails closed on its own errors
(HDFSObjectStorage::listObjects throws on anything but ENOENT), and it is the
fallback this function already uses when the hint read fails. Propagating
instead would turn a probe failure that is harmless today into a failed query.

The line predates this pull request and is present on master, but the enclosing
function is the one being made robust here, so the sibling probe is fixed with it.

The regression test fails only the probe for snapshot-N+1, leaving the hinted
snapshot answerable, because that is the single interleaving the two
implementations disagree on. Failing every probe makes the first one report the
hinted snapshot as absent, which falls through to the listing either way and
proves nothing. Reverting to exists() makes it read snapshot 1 instead of 2;
letting the throw escape instead of falling through makes it fail differently.
…int-concurrent-read-crash

# Conflicts:
#	src/Storages/ObjectStorage/DataLakes/Paimon/PaimonClient.cpp
@clickhouse-gh

clickhouse-gh Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 86.50% 86.50% +0.00%
Functions 91.90% 91.90% +0.00%
Branches 78.70% 78.70% +0.00%

Changed lines: Changed C/C++ lines covered: 365/414 (88.16%) · Uncovered code

Full report · Diff report

@groeneai

groeneai commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator Author

CI finish ledger for eb276e6

Every failure below has an owner: a fixing PR, or a full-effort fix task whose fixing-PR link will be posted here when it opens.

Check / test Reason Owner / fixing PR
Bugfix validation (unit tests) harness gap, not a regression signal: the before-binary cannot COMPILE the overlaid gtest, because the test references names this PR's own non-test diff introduces, so the check is structurally inconclusive a fix task is moved to pending (investigating at full effort, fixing-PR link to follow here)

174 of 174 check-runs completed, Finish Workflow green, and this was the only failure.

The discriminator for the inconclusive-compile class holds here: every FAILED: target is an overlaid test translation unit's own object, and the : error: lines are anchored in the overlaid test file rather than in product code. The actionable direction recorded on the owner is test-side, making gtest_paimon_latest_hint.cpp compile against both the before- and after-trees while still failing at runtime on the before-binary, since compile == ERROR is deliberate harness policy.

Session id: cron:our-pr-ci-monitor:20260802-010000

@clickhouse-gh

clickhouse-gh Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing 2aba6bd1a with master fd2595cd4 (stripped binary size, per-symbol sizes and ThinLTO time; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes
Binary Master PR Δ
programs/clickhouse-stripped 690.64 MiB 687.63 MiB -3.01 MiB (-0.44%)

Only the stripped binary is compared: the official master build keeps debug symbols while PR builds strip them, so the other binaries differ by construction.

Object file sizes

19 object files changed (+51.91 KiB total), 0 added.

Object file Master PR Δ
src/CMakeFiles/dbms.dir/Disks/IO/ReadBufferFromAzureBlobStorage.cpp.o 237.85 KiB 256.90 KiB +19.05 KiB (+8.01%)

737 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only clickhouse-bundle) and not compared.

Compile time of recompiled translation units

78 translation units recompiled, 332 s compile time in total, 38 of them have a recent master baseline.

Median compile-time ratio to the baselines is ×0.94 (machine-speed difference or a change affecting every TU); per-TU deltas below are relative to that ratio.
The matched translation units cost -19.2 s (-6%) in total before that adjustment.

Job report

@groeneai

groeneai commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

CI finish ledger - 910881a

Every failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
whose fixing-PR link will be posted here when it opens. Only CH Inc sync is exempt.

Check / test Reason Owner / fixing PR
Bugfix validation (unit tests) harness abort, not a test failure: Bugfix validation inconclusive: the before-binary failed to COMPILE the overlaid test a fix task is moved to pending (investigating at full effort, fixing-PR link to follow on this PR)

175/175 check-runs completed, 156 success, 18 skipped; Finish Workflow completed successfully.
The one red check never ran a test: the pre-fix binary failed to compile the overlaid unit test, so
the job self-reported ERROR without attributing anything to the touched regression case. It carries
allow_failure, so it is outside the merge gate, and CIDB records zero failing test rows on this commit.

Session id: cron:our-pr-ci-monitor:20260803-163000

@groeneai

groeneai commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator Author

Closing the loop on the Bugfix validation (unit tests) line in my CI finish ledger for 910881a91af4, which promised a fixing-PR link.

There will be no harness PR, and the line is better resolved on this PR's own test file. Recording why.

The job did not fail a test. It declined to produce a verdict: the overlaid gtest_paimon_mutable_metadata.cpp cannot compile against the merge-base sources because it references PaimonMetadata::isSnapshotLoadFailureSkippable and PaimonMetadata::readSchemaZeroTimeMillis, both added by this PR's own non-test diff (76 : error: anchors, the only FAILED: target being that test's own object file).

That outcome is deliberate, not a status-encoding oversight. ae4864a3575e made a compile failure inconclusive on purpose, and the rationale is stated in ci/jobs/unit_tests_bugfix_validation_job.py itself: a compile failure "only shows the test depends on code this PR adds (a new header/helper/symbol would fail to compile here too)", so it cannot be attributed to the touched regression case. Relaxing that would let a PR ship a regression test that never actually fails on master. I re-checked at current master and the policy is unchanged; the only commit to touch that file since is my own #113379, which changed suite detection, not the verdict.

The supported remedy is on the test side, keeping the runtime assertion intact, and it is what maintainers already do here: ff6fea4c8bba appended a parameter with a fail-close default so the call compiles against both signatures. if constexpr (requires { ... }) dispatching on the available signature, or moving the new declarations into their own header and compiling only the fix-dependent cases conditionally, work the same way. I applied that technique to my own coordinator gtest in e1c6c2dcbafbf3 on #105710 and the compile-inconclusive outcome went away on the next run, so it is effective rather than theoretical.

For this PR that means two accessors need a compile-time-guarded call in the gtest; the assertions themselves do not change. I am not opening a PR against someone else's job to avoid that.

alexey-milovidov and others added 2 commits August 6, 2026 11:56
… sources

The `Bugfix validation (unit tests)` job overlays this PR's changed
`src/**/tests/*` files onto the merge-base sources and builds the
before-binary from them, so the touched suite can demonstrate at runtime
that it catches the bug; the job is inconclusive when that build does
not compile. `gtest_paimon_mutable_metadata.cpp` referenced the three
`PaimonMetadata` accessors this PR adds
(`isSnapshotLoadFailureSkippable`, `readSchemaZeroTimeMillis`,
`isCommittedWatermarkFromSameTable`) unconditionally, so the
before-binary could not be built.

Route those calls through presence-dispatched template helpers, so the
test builds against both sources and demonstrates the bug at runtime on
the before-binary instead of breaking its build. Each fallback
reproduces the merge-base behaviour that the accessor replaces - a
failed snapshot load was always skipped, no table-identity probe
existed, and a committed watermark was always trusted - so the
assertions that pin the fix still fail there. No assertion is removed
or weakened. Verified with `-fsyntax-only` against both this branch and
current master sources; 11/11 Paimon gtests pass.

Co-Authored-By: Claude Fable 5 <[email protected]>
@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 Applied the test-side remedy from the comment above in ac4e82a18eb: the gtest now routes the PR-added PaimonMetadata accessors (isSnapshotLoadFailureSkippable, readSchemaZeroTimeMillis, and also isCommittedWatermarkFromSameTable, which the merge-base equally lacks) through presence-dispatched template helpers (if constexpr (requires { ... })), so Bugfix validation (unit tests) can build the before-binary and produce a verdict instead of going inconclusive on a compile failure.

Each fallback reproduces the merge-base behaviour the accessor replaces — a failed snapshot load was always skipped, no table-identity probe existed, and a committed watermark was always trusted — so the assertions that pin the fix still fail on the before-binary; no assertion is removed or weakened. Verified the TU with -fsyntax-only against both this branch and current master sources; 11/11 Paimon gtests pass locally. Master was also merged in (clean, no conflicts).

The AI review asked for an integration test that exercises the real
`iterate` -> `setCommittedSnapshot` -> `getCommittedSnapshotId` flow against
Keeper instead of only the helper-level gtests: keep a fixed
`paimon_keeper_path`, advance the watermark, externally drop and recreate the
Paimon table at the same location, and prove the next incremental read
consumes the recreated table instead of inheriting the old generation's
watermark and returning no rows.

ClickHouse#107134
@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 Addressed the AI review Major on ac4e82a18eb (end-to-end coverage of the watermark-generation fix) in 8401f17ebee, on top of a fresh master merge.

test_paimon_incremental_read/test.py::test_paimon_discards_watermark_after_external_recreate exercises the real Keeper-backed iterate → setCommittedSnapshot → getCommittedSnapshotId flow, exactly as the review asked: it keeps a fixed paimon_keeper_path (not {uuid}-based, so it survives a DROP of the ClickHouse table), advances the committed watermark on the first table generation, externally drops and recreates the Paimon table at the same location, re-creates the ClickHouse table at the same keeper path, and proves the first incremental read returns the recreated table's rows (5) instead of inheriting the old generation's watermark and returning 0 forever. A follow-up read returns 0, showing the discarded watermark was re-latched to the new generation. On the merge-base binary the inherited watermark (committed_snapshot >= LATEST) makes the first read return no rows, so the test fails there and gives Bugfix validation (integration tests) a real verdict.

The test passed locally against a real Keeper and the dockerized Paimon writer, and 11/11 Paimon gtests still pass after the master merge.

For the record, the only reds on ac4e82a18eb were unrelated: 28 unstable-classified performance queries on non-Paimon tests (noise), and the Build (arm_release) post-hook failing to INSERT build-profile data into LogCluster (infra outage, fix in #113592). Bugfix validation (unit tests) produced a real green verdict on that head, confirming the presence-dispatch remedy.

The helper's keeper_path is a str.format() substituted VALUE, not template
text, and str.format never re-scans substituted values for braces. Doubling
the braces in the value therefore emits the literal string
'/clickhouse/tables/{{uuid}}' into the DDL, and the server's macro expander
(Macros::expand, reached from expandPaimonKeeperMacrosIfNeeded) reads the
macro name as '{uuid' and rejects it with NO_ELEMENTS_IN_CONFIG.

Only the template needs doubled braces, which is why the sibling literal
'{{replica}}' on the line above is correct and must stay as it is.

The two callers that rely on the default keeper_path failed on the previous
head of this branch:
  test_paimon_incremental_read_via_paimon_table_engine
  test_paimon_to_mergetree_via_refresh_mv
test_paimon_discards_watermark_after_external_recreate passes an explicit
brace-free path, so it was unaffected and stays unaffected.

Verified by rendering the helper's own template, extracted from the file's
AST rather than retyped, for every keeper_path value the file actually
passes. The rendered SETTINGS clause is now byte-identical to the one
produced by ac4e82a, the last head on which CIDB records this test
passing (4 OK), while the current head renders the doubled form that CIDB
records failing. Reverting the change reinstates the doubled form, so the
probe discriminates.

Test-only change; no build is affected.
@groeneai

groeneai commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

Pushed 1ac6354d1d37371 to fix two test_paimon_incremental_read failures that 8401f17ebee introduced, so that Integration tests (amd_asan_ubsan, flaky) red is not a flake.

In _create_clickhouse_table_for_paimon_incremental_read, keeper_path is a str.format() substituted value, and str.format never re-scans substituted values for braces. Doubling the braces in the value therefore emits the literal '/clickhouse/tables/{{uuid}}' into the DDL, and Macros::expand (reached from expandPaimonKeeperMacrosIfNeeded) then reads the macro name as {uuid and rejects it with NO_ELEMENTS_IN_CONFIG. Only the template needs doubled braces, which is why the sibling literal '{{replica}}' on the line above is correct and I left it alone. The fix is to pass keeper_path through unchanged.

Affected exactly the two callers that rely on the default argument:

  • test_paimon_incremental_read_via_paimon_table_engine
  • test_paimon_to_mergetree_via_refresh_mv

test_paimon_discards_watermark_after_external_recreate passes an explicit brace-free path, so it was never affected and is unaffected by the fix.

I verified it by rendering the helper's own template, taken from each revision's AST rather than retyped, for every keeper_path value the file actually passes. The rendered SETTINGS clause is now byte-identical to the one ac4e82a18eb produced, which is the last head where CIDB records this test passing (4 OK), while 8401f17ebee renders the doubled form CIDB records failing. Reverting the line reinstates the doubled form, so the two tests above do pin it.

Test-only change, one line, no build impact. I did not squash or rebase, and left your commits untouched.

@groeneai

groeneai commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

CI finish ledger - 1ac6354

No failure to own on this head: all 175 check-runs completed with 127 success and 48 skipped,
zero failure / timed_out / cancelled, and Finish Workflow completed successfully.

The Bugfix validation (unit tests) harness abort that the ledger for 910881a91af4 had to give an
owner is success here, so that line is discharged rather than carried forward. All five
Bugfix validation jobs pass.

CIDB records four FAIL rows on this commit, all in Bugfix validation (integration tests, amd64 and
aarch64) for test_paimon_incremental_read_via_paimon_table_engine and
test_paimon_to_mergetree_via_refresh_mv. Those are the master-binary side of the bugfix check: the
overlaid tests are required to fail without the fix, which is why both jobs conclude success. On the
PR side the same two tests pass on every regular flavour that ran them (amd_asan_ubsan db disk old analyzer 6/6, amd_asan_ubsan flaky, amd_llvm_coverage 2/8, amd_msan 6/8, amd_tsan 6/6,
arm_binary distributed plan 2/4), so they are not a regression.

Session id: cron:our-pr-ci-monitor:20260807-083000

… contract

The AI review on 1ac6354 pointed out that while the PR body and
changelog now mention the bounded one-time replay that happens when a
committed watermark carries no table-generation marker (state written
before generation tracking, or inherited from a table recreated at the
same `paimon_keeper_path`), the structured setting description and the
public engine documentation still promised strict "only new data since
the last committed snapshot" semantics.

Bring the public contract in line with the intended behaviour:
- the `paimon_incremental_read` setting description now states that the
  watermark is bound to the table generation and that a watermark of
  unknown generation is discarded, causing a bounded one-time replay
  before the marker is latched (fail-close, never silent skipping);
- the embedded engine documentation in `registerStorageObjectStorage.cpp`
  (the source of the autogenerated Paimon docs page) gains a Limitations
  bullet describing the same behaviour, including the upgrade case;
- the `PaimonStreamState` at-most-once note and the `PaimonMetadata`
  `iterate` comment reference the exception explicitly.

ClickHouse#107134 (comment)

Co-Authored-By: Claude Fable 5 <[email protected]>
@groeneai

groeneai commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

CI finish ledger - 4dd825b

Every failure below has an owner: a fixing PR (mine or external), or a full-effort fix task whose
fixing-PR link will be posted here when it opens. Only CH Inc sync is exempt.

Check / test Reason Owner / fixing PR
AST fuzzer (arm_asan_ubsan) / UndefinedBehaviorSanitizer: undefined behavior (STID 0250-39f3) member access within a null DB::IAST at TreeRewriter.cpp:850 in expandOrderByAll, reached from ReadFromMerge::createChildrenPlans. Not in this PR's diff. #113759 (external, open)
Stateless tests (amd_llvm_coverage, ParallelReplicas, s3 storage, parallel) / 04561_ie_join_storage_join test defect: three assertions invert under ParallelReplicas, deterministic (3 of 3 reruns). Not in this PR's diff. #113840 (external, merged) - this build predates it

Both failures are owned and neither is caused by this PR.

AST fuzzer (arm_asan_ubsan). The stack is expandOrderByAll dereferencing
select_query->orderBy() when the order_by_all flag is set but the ORDER BY clause is gone,
under ReadFromMerge::createChildrenPlans. #113759 adds exactly that guard at both call sites in
TreeRewriter.cpp, and also resets group_by_all in removeJoin, so it addresses this faulting
line directly. Over 90 days the frame expandOrderByAll accounts for 4 CIDB failure rows across 4
unrelated PRs and zero master rows, under two STID facets of 0250-39f3 (this UBSan report and a
segfault). My own #109139 fixes the same family from the getHeaderForProcessingStage side and is
superseded by #113759 for this line.

04561_ie_join_storage_join. Added yesterday by #113753 and broken on arrival: over 60 days
CIDB records 53 failure rows across 42 distinct PRs plus 12 rows with head_ref = master, all
within one day, and the runner's own diagnosis with randomization disabled is
Failed 3 out of 3 reruns. #113840 corrects the test and merged at 2026-08-07T20:50:30Z; this job
started at 19:56Z, so the build predates the fix. I am not merging master to pick it up: this branch
carries manual approve and its head commit is a maintainer's, so a push here costs a maintainer
approval for a test-only fix that arrives on its own with the next update of the branch.

Bugfix validation (integration tests, amd64 and aarch64). CIDB records 4 FAIL rows for
test_paimon_incremental_read_via_paimon_table_engine and test_paimon_to_mergetree_via_refresh_mv,
which are the master-binary side of the bugfix check: the overlaid tests are required to fail without
the fix. Both legs confirm it. All five Bugfix validation jobs conclude success, and the same two
tests are OK on every regular Integration flavour that ran them on this exact commit
(amd_asan_ubsan db disk old analyzer 6/6, amd_asan_ubsan flaky, amd_llvm_coverage 2/8,
amd_msan 6/8, amd_tsan 6/6, arm_binary distributed plan 2/4). No owner is owed.

Conclusion histogram over all 175 check-runs on this head: 159 success, 14 skipped, 2 failure,
0 queued or in progress. Finish Workflow and Config Workflow both success.

Session id: cron:our-pr-ci-monitor:20260807-213000

…out aborting

The identity guard in `validateTableIdentity` threw `LOGICAL_ERROR`, which
aborts the server in debug and sanitizer builds (`Exception::handleErrorCode`),
so the fail-close path for an external `DROP` + re-`CREATE` was itself a crash
there; it now throws `INCORRECT_DATA` (the same code
`PlainRewritable` uses for a concurrently recreated directory). Per review, the
`paimon_target_snapshot_id` recreate guard is now covered end-to-end: a new
pauseable failpoint `paimon_iterate_pause_before_target_snapshot_load` holds a
targeted read between the identity check at the top of `iterate` and
`loadStateForSnapshot`, and
`test_paimon_targeted_read_fails_closed_on_external_recreate` lands an external
recreate inside that window and asserts the read fails closed instead of
serving the recreated table's snapshot-1 under the old ClickHouse table.
@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 CI finish ledger — 4dd825b

Every red on that head is classified below; the head pushed after it (d863ae0e97e) merges master and implements the AI-review verdict (end-to-end coverage of the paimon_target_snapshot_id recreate guard via a new pauseable failpoint, plus validateTableIdentity no longer throwing LOGICAL_ERROR, which aborts the server in debug and sanitizer builds).

Check / test Reason Owner / fixing PR
Stateless (amd_llvm_coverage, ParallelReplicas) / 04561_ie_join_storage_join Trunk-wide on 2026-08-07 (failed on master and ~120 PRs): the test was added without a no-parallel-replicas tag, so the storage-join path it asserts is not taken. Fixed on master by ec1a1cdadf2 ("FIx test under parallel replicas"), which this merge pulls in. fixed on master
AST fuzzer (arm_asan_ubsan) / UBSan null member access in expandOrderByAll (TreeRewriter.cpp:850) ORDER BY ALL + JOIN over merge() with the old analyzer — nothing to do with Paimon. #113758, fix #113759 (open)
CH Inc sync / Integration tests E2E: 7 × test_e2e_catalogs … [glue] AWS Glue catalog environment flake: Exception calling GetTables Database ch_e2e_glue_… not found in GlueCatalog::getTablesForDatabase — the Glue/Iceberg catalog path is untouched by this PR, and the same job passes on other same-day sync PRs. The new push re-creates the sync PR and re-rolls it. environment
CH Inc sync / Stress test (arm_asan_ubsan, SharedCatalog, meta in keeper): Current component is empty … Coordination::setCurrentComponent Known private-side issue (comp-metadata-in-keeper); the same job also fails on the sync PR of an unrelated upstream PR (#113491). private issue 63959

@groeneai

groeneai commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator Author

CI finish ledger - d863ae0

Every failure below has an owner: a fixing PR (mine or external), or a full-effort fix task whose
fixing-PR link will be posted here when it opens. Only CH Inc sync is exempt.

All 175 check-runs on this head completed: 161 success / 14 skipped / 0 failure / 0
timed_out / 0 cancelled
. Config Workflow and Finish Workflow both succeeded, so this is
not either dropped-CI shape. Nothing here is caused by this PR: the 18 changed files are all
Paimon / Azure / ObjectStorage plus two tests, and none of them is a CI harness file.

Check / test Reason Owner / fixing PR
Build (arm_release) / Post Hooks build_profile_hook telemetry lost: LogCluster readiness probe fails, so the INSERT is abandoned. Non-gating, the build itself is success. a fix task is moved to pending (investigating at full effort - fixing PR link to follow on this PR)
Bugfix validation (integration tests, amd64 and aarch64) / test_paimon_incremental_read_via_paimon_table_engine, test_paimon_to_mergetree_via_refresh_mv master-binary side of the bugfix gate, not a regression no owner owed, see below
CH Inc sync still pending (tests started 12:17:05Z) CH Inc sync (private, not actionable by me)

Build (arm_release) / Post Hooks. This row is invisible to the check-runs API because the
enclosing build concludes success; it exists only as a CIDB test_status = FAIL. Its context is
ERROR: No connection to LogCluster then ERROR: LogCluster not ready, and the traceback ends at
log_cluster.py:239. Measured on this exact row: No connection to LogCluster x1,
LogCluster not ready x1, code 500 x0, Code: 241 x0, WARNING x0. That places it in the
readiness-probe mode, where do_query's retry ladder is never entered, and not in the HTTP-500 /
Code: 241 retry-exhaustion mode. So #113409 ("Retry the build-profile telemetry INSERT", merged
2026-08-06) is deliberately not linked here: it raises the retry count inside do_query, which
this failure never reaches. Over 7 days the readiness signature accounts for 326 CIDB rows across 222
distinct PRs with 53 rows on master, so it is broad and unrelated to this branch. A fix task owns it
and its fixing-PR link will be posted here.

Bugfix validation. Both legs were measured and agree that this is the required master-side
failure, not a regression. Leg 1: all five Bugfix validation check-runs conclude success
(functional amd64 and aarch64, integration amd64 and aarch64, unit tests). Leg 2: the same two tests
pass on every regular integration flavour that ran them on this commit - amd_asan_ubsan db disk old analyzer 6/6, amd_asan_ubsan flaky, amd_llvm_coverage 2/8, amd_msan 6/8, amd_tsan 6/6,
arm_binary distributed plan 2/4. The overlaid tests are required to fail against the master binary,
which is what these four rows are.

The two failures owned on the previous head are both discharged rather than carried forward:
04561_ie_join_storage_join is green here because this head merged master and picked up
ec1a1cdadf2, and the expandOrderByAll UBSan report did not recur.

Session id: cron:our-pr-ci-monitor:20260808-160000

The declaration comment in `PaimonMetadata.h` still said an absent
`committed_table_identity` means the watermark is used, which is the
pre-fix behavior. The implementation discards such a watermark once
(fail-close) and reads the current table from its first snapshot; the
comment now distinguishes the two cases correctly.

Co-Authored-By: Claude Fable 5 <[email protected]>
@groeneai

groeneai commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator Author

Fixing PR for the Build (arm_release) / Post Hooks line on d863ae0e97e0c84d3d81fe80a011141aed1ecbdb: #113592 (external, open, MERGEABLE/CLEAN, CI green) - which @ alexey-milovidov already named on this thread on 2026-08-07.

Completing my own ledger obligation from #107134 (comment): the readiness-probe mode is caused by LogCluster.do_query probing is_ready() once before its retry ladder (ci/jobs/scripts/log_cluster.py:88-90), so a single 3-second SELECT 1 blip drops the upload with no POST attempted. #113592 removes exactly those three statements and re-probes inside the backoff loop.

#113409 remains deliberately unlinked: it raises do_querys retry count, which this mode never reaches.

@groeneai

groeneai commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator Author

CI finish ledger - 2aba6bd

Every failure below has an owner: a fixing PR (ours or external), or a full-effort fix task
whose fixing-PR link will be posted here when it opens. Only CH Inc sync is exempt.

CI is fully finished on this commit with no failed checks - every dispatched job
reported success, so there is nothing to assign an owner to.

Session id: cron:our-pr-ci-monitor:20260809-170000

@alexey-milovidov alexey-milovidov removed their assignment Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors manual approve Manual approve required to run CI pr-critical-bugfix pr-must-backport Pull request should be backported intentionally. Use this label with great care! submodule changed At least one submodule changed in this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants