Skip to content

In IMergeTreeDataPart::appendCSNToVersionMetadata, try to rewrite the metadata version if WriteMode::Append is not implemented. - #83349

Closed
tuanpach wants to merge 1 commit into
ClickHouse:masterfrom
tuanpach:fix-issue-83319
Closed

tuanpach wants to merge 1 commit into
ClickHouse:masterfrom
tuanpach:fix-issue-83319

Conversation

@tuanpach

@tuanpach tuanpach commented Jul 6, 2025 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

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

When appending CSN, if we always using Rewrite mode:

  auto impl = object_storage.writeObject(
        object,
        /// We always use mode Rewrite because we simulate append using metadata and different files
        WriteMode::Rewrite,
        object_attributes,
        buf_size,
        settings);

But in MetadataStorageFromPlainObjectStorageTransaction, addBlobToMetadata is a noop

 void addBlobToMetadata(const std::string & /* path */, ObjectStorageKey /* object_key */, uint64_t /* size_in_bytes */) override
    {
        /// Noop
    }

So in IMergeTreeDataPart::appendCSNToVersionMetadata', when appending the creation_csntotxn_version.txt, it actually rewrites, making txn_version.txt` invalid.

If VersionMetadata::writeCSN with WriteMode::Append fails, we try to rewrite the whole metadata.

Fixes: #84084

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

@tuanpach tuanpach added the can be tested Allows running workflows for external contributors label Jul 6, 2025
@clickhouse-gh

clickhouse-gh Bot commented Jul 6, 2025 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [a7fd711]

Summary: ❌

job_name test_name status info comment
Stateless tests (amd_binary, old analyzer, s3 storage, DatabaseReplicated, parallel) failure
02435_rollback_cancelled_queries FAIL
03100_lwu_11_with_mutations FAIL
Stateless tests (amd_binary, ParallelReplicas, s3 storage, parallel) failure
Logical error thrown (see clickhouse-server.log or logical_errors.txt) FAIL
Stateless tests (amd_debug, distributed plan, s3 storage, parallel) failure
03562_transaction_with_plain_rewritable_disk FAIL
Stress test (amd_debug) failure
Server died FAIL
Hung check failed, possible deadlock found (see hung_check.log) FAIL
Killed by signal (in clickhouse-server.log) FAIL
Fatal message in clickhouse-server.log (see fatal_messages.txt) FAIL
Killed by signal (output files) FAIL
Found signal in gdb.log FAIL
Stress test (arm_asan) failure
Server died FAIL
Hung check failed, possible deadlock found (see hung_check.log) FAIL
Killed by signal (in clickhouse-server.log) FAIL
Fatal message in clickhouse-server.log (see fatal_messages.txt) FAIL
Killed by signal (output files) FAIL

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Jul 6, 2025
@tuanpach
tuanpach force-pushed the fix-issue-83319 branch 3 times, most recently from 3d75547 to 71900b3 Compare July 7, 2025 07:20
@tuanpach
tuanpach marked this pull request as draft July 14, 2025 08:53
@tuanpach tuanpach removed the can be tested Allows running workflows for external contributors label Jul 14, 2025
@tuanpach

Copy link
Copy Markdown
Member Author

Wait for #83695

@tuanpach tuanpach added the can be tested Allows running workflows for external contributors label Aug 2, 2025
@clickhouse-gh

clickhouse-gh Bot commented Sep 2, 2025

Copy link
Copy Markdown
Contributor

Dear @azat, this PR hasn't been updated for a while. You will be unassigned. Will you continue working on it? If so, please feel free to reassign yourself.

@tuanpach

Copy link
Copy Markdown
Member Author

Close as there is a refactoring PR #87125

@azat azat closed this Oct 17, 2025
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 pr-ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants