Repository navigation
Conversation
tuanpach
marked this pull request as draft
September 15, 2025 13:12
Contributor
|
Workflow [PR], commit [027645a] Summary: ❌
|
tuanpach
force-pushed
the
decouple-version-logic-from-merge-tree-data-part
branch
3 times, most recently
from
September 16, 2025 01:31
65dda1a to
ef8ff3b
Compare
tuanpach
marked this pull request as ready for review
September 16, 2025 06:32
tuanpach
force-pushed
the
decouple-version-logic-from-merge-tree-data-part
branch
3 times, most recently
from
September 19, 2025 07:04
236807e to
e4b7b3f
Compare
tuanpach
marked this pull request as draft
September 19, 2025 10:26
tuanpach
force-pushed
the
decouple-version-logic-from-merge-tree-data-part
branch
2 times, most recently
from
September 20, 2025 13:04
dddb311 to
e7a6073
Compare
tuanpach
marked this pull request as ready for review
September 20, 2025 23:45
1 task
tuanpach
force-pushed
the
decouple-version-logic-from-merge-tree-data-part
branch
from
September 25, 2025 02:05
5b8320b to
b57bba7
Compare
tuanpach
marked this pull request as draft
September 29, 2025 02:41
tuanpach
force-pushed
the
decouple-version-logic-from-merge-tree-data-part
branch
7 times, most recently
from
October 3, 2025 10:11
6fa0728 to
a32abbb
Compare
tuanpach
marked this pull request as ready for review
October 7, 2025 08:14
tuanpach
force-pushed
the
decouple-version-logic-from-merge-tree-data-part
branch
from
October 13, 2025 04:30
a32abbb to
90e7d5a
Compare
Member
|
Does this also supersedes #83349? |
Member
Author
Yes, will close it |
1 task
Contributor
|
Dear @tavplubix, 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. |
- Make VersionMetadata a base class.
- Create VersionMetadataOnDisk subclass inheriting from VersionMetadata and persisting metadata on a disk along with the data part.
- Move the logic of the old VersionMetadata to VersionMetadataOnDisk
- Move version logic from IMergeTreeDataPart to VersionMetadata and VersionMetadataOnDisk
Refactor changes:
- Move src/Interpreters/TransactionVersionMetadata.cpp, .h, -> src/Interpreters/MergeTreeTransaction/VersionMetadata.cpp, .h
- Make VersionMetadata a base class
- In VersionMetadata:
- Separate the logic of storing removalTIDLock and removalTID.
- Previously, removal_tid is set in tryLockRemovalTID, unlockRemovalTID. Then, stored in the metadata file with appendRemovalTIDToVersionMetadata(bool clear).
- In this PR, lockRemovalTID and unlockRemovalTID only set the removal_tid_lock hash. removal_tid is set and stored in the stored data by storeRemovalTID.
- Have new methods:
- storeCreationCSN: set and store creation CSN
- storeRemovalCSN: set and store removal CSN
- storeRemovalTID: set and store removal TDI
- loadAndVerifyMetadata: load and verify metadata stored in storage.
- wasInvolvedInTransaction: check if the object was involved in a transaction
- In VersionMetadataOnDisk which inherits from VersionMetadata:
- Check if the storage supports writing with Append:
- If yes, store the info in append mode
- If no, overwrite it with the complete new metadata.
- If the object is not involved in any transaction, it might delay storing the data into storage. Previously, the check was done in VersionMetadata.
tuanpach
force-pushed
the
decouple-version-logic-from-merge-tree-data-part
branch
from
November 25, 2025 03:59
90e7d5a to
027645a
Compare
Member
Author
|
Close this PR as there are too many force pushes. Created a new PR: #92141 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Decouple version logic from IMergeTreeDataPart. This is the first step in supporting version metadata on Keeper, which enables transactions on SharedMergeTree.
This PR has the following changes:
VersionMetadataa base class.VersionMetadataOnDisksubclass inheriting fromVersionMetadataand persisting metadata on a disk along with the data part.VersionMetadatatoVersionMetadataOnDiskIMergeTreeDataParttoVersionMetadataandVersionMetadataOnDiskVersionMetadataOnKeeperwill be another subclass ofVersionMetadataRefactor changes:
Move
src/Interpreters/TransactionVersionMetadata.cpp, .h, ->src/Interpreters/MergeTreeTransaction/VersionMetadata.cpp, .hMake
VersionMetadataa base classIn
VersionMetadata:removalTIDLockandremovalTID.tryLockRemovalTID,unlockRemovalTID. Then, stored in the metadata file withappendRemovalTIDToVersionMetadata(bool clear).lockRemovalTIDandunlockRemovalTIDonly set the removal_tid_lock hash. removal_tid is set and stored in the stored data bystoreRemovalTID.storeCreationCSN: set and store creation CSNstoreRemovalCSN: set and store removal CSNstoreRemovalTID: set and store removal TDIloadAndVerifyMetadata: load and verify metadata stored in storage.wasInvolvedInTransaction: check if the object was involved in a transactionIn
VersionMetadataOnDiskwhich inherits fromVersionMetadata:VersionMetadata.Documentation entry for user-facing changes