Skip to content

Commit 9140d43

Browse files
committed
aa
1 parent c355ae6 commit 9140d43

File tree

6 files changed

+14
-3
lines changed

6 files changed

+14
-3
lines changed

src/Databases/DatabaseReplicated.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2110,7 +2110,8 @@ bool DatabaseReplicated::shouldReplicateQuery(const ContextPtr & query_context,
21102110
if (const auto * alter = query_ptr->as<const ASTAlterQuery>())
21112111
{
21122112
if (alter->isAttachAlter() || alter->isFetchAlter() || alter->isDropPartitionAlter()
2113-
|| is_keeper_map_table(query_ptr) || alter->isFreezeAlter() || alter->isUnlockSnapshot())
2113+
|| is_keeper_map_table(query_ptr) || alter->isFreezeAlter() || alter->isUnlockSnapshot()
2114+
|| alter->isExportPartAlter())
21142115
return false;
21152116

21162117
if (has_many_shards() || !is_replicated_table(query_ptr))

src/Interpreters/DDLWorker.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,8 @@ bool DDLWorker::taskShouldBeExecutedOnLeader(const ASTPtr & ast_ddl, const Stora
747747
alter->isFreezeAlter() ||
748748
alter->isUnlockSnapshot() ||
749749
alter->isMovePartitionToDiskOrVolumeAlter() ||
750-
alter->isCommentAlter())
750+
alter->isCommentAlter() ||
751+
alter->isExportPartAlter())
751752
return false;
752753
}
753754

src/Interpreters/executeDDLQueryOnCluster.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ bool isSupportedAlterTypeForOnClusterDDLQuery(int type)
5353
ASTAlterCommand::ATTACH_PARTITION,
5454
/// Usually followed by ATTACH PARTITION
5555
ASTAlterCommand::FETCH_PARTITION,
56+
/// Data operation that should be executed locally on each replica
57+
ASTAlterCommand::EXPORT_PART,
5658
/// Logical error
5759
ASTAlterCommand::NO_TYPE,
5860
};

src/Parsers/ASTAlterQuery.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,11 @@ bool ASTAlterQuery::isMovePartitionToDiskOrVolumeAlter() const
647647
return false;
648648
}
649649

650+
bool ASTAlterQuery::isExportPartAlter() const
651+
{
652+
return isOneCommandTypeOnly(ASTAlterCommand::EXPORT_PART);
653+
}
654+
650655

651656
/** Get the text that identifies this element. */
652657
String ASTAlterQuery::getID(char delim) const

src/Parsers/ASTAlterQuery.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,8 @@ class ASTAlterQuery : public ASTQueryWithTableAndOutput, public ASTQueryWithOnCl
264264

265265
bool isMovePartitionToDiskOrVolumeAlter() const;
266266

267+
bool isExportPartAlter() const;
268+
267269
bool isCommentAlter() const;
268270

269271
String getID(char) const override;

tests/queries/0_stateless/03572_export_replicated_merge_tree_part_to_object_storage.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
# Tags: replica, no-parallel
2+
# Tags: replica, no-parallel, no-replicated-database
33

44
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
55
# shellcheck source=../shell_config.sh

0 commit comments

Comments
 (0)