Repository navigation
Cherry pick #125026 to 26.10: Log a lost Iceberg metadata commit race at Debug, not Error - #130155
Conversation
Each sink of a parallel INSERT into an Iceberg table commits its own
snapshot, so with max_insert_threads > 1 the sinks race for the same
metadata version. The loser's conditional write fails with
FILE_ALREADY_EXISTS (local, If-None-Match), STALE_VERSION (local,
If-Match) or an S3 412 PreconditionFailed, and the caller retries on
the next version. writeMetadataFile and tryWriteVersionHintFile logged
that expected outcome with tryLogCurrentException, i.e. at Error with a
stack trace, which reaches the client's stderr with
send_logs_level=warning and fails stateless tests such as
05325_iceberg_mixed_format_top_k_dynamic_filtering ("having stderror"),
although the INSERT succeeds and the data is correct.
Classify such a failure with one helper, isConditionalWriteConflict,
and log only that case at Debug, keeping every other failure at Error.
This matches the REST catalog commit path (409 is logged at Debug) and
the S3 layer, which already logs a 412 at Info (#99371). Control flow
is unchanged. IcebergMetadata::createInitial reuses the helper for its
CREATE ... IF NOT EXISTS race; its behaviour is identical because that
write is If-None-Match only.
The new test runs parallel INSERTs (8 sinks, 10 INSERTs, version hint
off and on) and fails on every run without the change.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-cas-debug-log # Conflicts: # src/Storages/ObjectStorage/DataLakes/Iceberg/Utils.cpp
…g-log Log a lost Iceberg metadata commit race at Debug, not Error
Resolve the conflict in Iceberg/Utils.cpp: both regions came from #125406 (`READONLY`, `isRefusedWrite`, `isKnownAbsent`), which is not on 26.10. Keep the 26.10 side and add only #125026's own lines (the three error codes and `isConditionalWriteConflict`). Per file, the change against 26.10 is the same set of added and removed lines as #125026's diff against master. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The only conflict is in On the 26.10 tree (debug, clang-22), I cannot push to |
|
🕵 Thanks @groeneai. I checked the merge |
Original pull-request #125026
Do not merge this PR manually
This pull-request is a first step of an automated backporting.
It contains changes similar to calling
git cherry-picklocally.If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.
The check results does not matter at this step - you can safely ignore them.
Before you resolve anything
Conflicts are often caused by a prerequisite change that has not been backported yet, rather than by a real divergence. The bot re-tries this cherry-pick against the release branch on every run, so if that is the case here it will merge itself as soon as the prerequisite lands, and you will see a comment saying so. Manual resolution is only needed while the conflict persists.
Troubleshooting
If the conflicts were resolved in a wrong way
If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:
pr-cherrypicklabel from the PRYou also need to check the Original pull-request for
pr-backports-createdlabel, and delete if it's presented thereThe PR source
The PR is created in the CI job