-
Notifications
You must be signed in to change notification settings - Fork 18
Antalya-26.3 Added support for TTL EXPORT #1810
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: antalya-26.3
Are you sure you want to change the base?
Changes from 22 commits
aaf9897
399bd77
0fb5adb
be213b7
0664ab8
97d6ae1
77df5e6
7a4acf4
f7d8a27
b876bb3
3e6e29e
0065763
e7e7287
1ebd610
c3b83ac
48097f2
e148b48
3428e69
dd3a2ac
335938f
153b4a1
f6cbe79
45e0442
0469250
37eca94
c7ed5f1
3767581
14e5461
4abd8db
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,8 +3,11 @@ | |
| #include <Common/ProfileEvents.h> | ||
| #include <Common/FailPoint.h> | ||
| #include <Common/logger_useful.h> | ||
| #include <Parsers/IAST.h> | ||
| #include "Storages/ColumnsDescription.h" | ||
| #include "Storages/ExportReplicatedMergeTreePartitionManifest.h" | ||
| #include "Storages/ExportReplicatedMergeTreePartitionTaskEntry.h" | ||
| #include "Storages/StorageInMemoryMetadata.h" | ||
| #include <Storages/MergeTree/MergeTreeData.h> | ||
| #include <filesystem> | ||
| #include <thread> | ||
|
|
@@ -32,6 +35,7 @@ namespace ErrorCodes | |
| { | ||
| extern const int FAULT_INJECTED; | ||
| extern const int BAD_ARGUMENTS; | ||
| extern const int INCOMPATIBLE_COLUMNS; | ||
| extern const int NO_SUCH_DATA_PART; | ||
| extern const int CORRUPTED_DATA; | ||
| extern const int NETWORK_ERROR; | ||
|
|
@@ -47,6 +51,27 @@ namespace fs = std::filesystem; | |
|
|
||
| namespace ExportPartitionUtils | ||
| { | ||
| void verifyExportDestinationCompatibility( | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Haven't checked the rest of the code yet, but we must also check for partition expression compatbility for data lakes
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah true, thanks. I haven't moved that part of the code yet. Will do!
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done it in 3767581 |
||
| const ColumnsDescription & src_columns, | ||
| const ASTPtr & src_partition_key_ast, | ||
| const StorageInMemoryMetadata & dest_metadata, | ||
| const IStorage & dest_storage) | ||
| { | ||
| if (src_columns.getReadable().sizeOfDifference(dest_metadata.getColumns().getInsertable())) | ||
| throw Exception(ErrorCodes::INCOMPATIBLE_COLUMNS, "Tables have different structure"); | ||
|
|
||
| if (dest_storage.isDataLake()) | ||
| return; | ||
|
|
||
| const auto ast_to_string = [](const ASTPtr & ast) -> String | ||
| { | ||
| return ast ? ast->formatWithSecretsOneLine() : ""; | ||
| }; | ||
|
|
||
| if (ast_to_string(src_partition_key_ast) != ast_to_string(dest_metadata.getPartitionKeyAST())) | ||
| throw Exception(ErrorCodes::BAD_ARGUMENTS, "Tables have different partition key"); | ||
| } | ||
|
|
||
| std::vector<Field> getPartitionValuesForIcebergCommit( | ||
| MergeTreeData & storage, const String & partition_id) | ||
| { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you plan to merge it with the backoff policy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I was planning to remove the backoff policy from the TTL scheduler itself and rely strictly on export partition backoff. Since it's not yet a thing, I thought about keeping it for a while. But considering the fact it actually introduces settings and changes in settings history, I think I'll drop it now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dropped: c7ed5f1