Separate data storage abstraction for MergeTree#36555
Merged
KochetovNicolai merged 41 commits intomasterfrom Jun 22, 2022
Merged
Separate data storage abstraction for MergeTree#36555KochetovNicolai merged 41 commits intomasterfrom
KochetovNicolai merged 41 commits intomasterfrom
Conversation
amosbird
reviewed
Apr 26, 2022
| ErrorCodes::LOGICAL_ERROR); | ||
| throw Exception( | ||
| ErrorCodes::LOGICAL_ERROR, | ||
| "Attempt to store uninitialized MinMax index for part {}. This is a bug.", |
alesapin
reviewed
Jun 20, 2022
alesapin
approved these changes
Jun 21, 2022
| class TemporaryFileOnDisk; | ||
|
|
||
| /// This is an abstraction of storage for data part files. | ||
| /// Generally, it contains read-only methods from IDisk. |
Member
There was a problem hiding this comment.
outdated comment? I see a lot of write methods...
| virtual ~IDataPartStorage() = default; | ||
|
|
||
| /// Methods to get path components of a data part. | ||
| virtual std::string getFullPath() const = 0; /// '/var/lib/clickhouse/data/database/table/moving/all_1_5_1' |
| /// Generally, it contains read-only methods from IDisk. | ||
| class IDataPartStorage | ||
| { | ||
| private: |
| } | ||
|
|
||
| auto disk = part->volume->getDisk(); | ||
| //auto disk = part->volume->getDisk(); |
| String file_name = it.first; | ||
|
|
||
| String path = fs::path(part->getFullRelativePath()) / file_name; | ||
| //String path = fs::path(part->getRelativePath()) / file_name; |
| = MutationsInterpreter::MutationKind::MutationKindEnum::MUTATE_UNKNOWN; | ||
|
|
||
| VolumePtr single_disk_volume; | ||
| //VolumePtr single_disk_volume; |
| { | ||
| checkConsistencyBase(); | ||
| String path = getFullRelativePath(); | ||
| // String path = getRelativePath(); |
src/Storages/StorageMergeTree.cpp
Outdated
| { | ||
| auto disk = part->volume->getDisk(); | ||
| String part_path = part->getFullRelativePath(); | ||
| //auto disk = part->volume->getDisk(); |
|
|
||
| ctx->disk = ctx->new_data_part->volume->getDisk(); | ||
| ctx->new_part_tmp_path = ctx->new_data_part->getFullRelativePath(); | ||
| // ctx->disk = ctx->new_data_part->volume->getDisk(); |
| continue; | ||
|
|
||
| String destination = ctx->new_part_tmp_path; | ||
| String destination; // = ctx->new_part_tmp_path; |
Member
There was a problem hiding this comment.
Suggested change
| String destination; // = ctx->new_part_tmp_path; | |
| String destination; |
tavplubix
reviewed
Jun 30, 2022
| { | ||
| if (relative_path.empty()) | ||
| throw Exception("Part relative_path cannot be empty. It's bug.", ErrorCodes::LOGICAL_ERROR); | ||
| // String IMergeTreeDataPart::getFullPath() const |
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 to CHANGELOG.md):
.