Skip to content

Commit 6b07680

Browse files
committed
well well
1 parent 3b279bd commit 6b07680

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/Interpreters/ClientInfo.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ class ClientInfo
139139
NOT_A_BACKGROUND_OPERATION = 0,
140140
MERGE = 1,
141141
MUTATION = 2,
142+
EXPORT_PART = 3,
142143
};
143144

144145
/// It's ClientInfo and context created for background operation (not real query)

src/Storages/MergeTree/MergeTreeData.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9132,7 +9132,12 @@ bool MergeTreeData::scheduleDataMovingJob(BackgroundJobsAssignee & assignee)
91329132
continue;
91339133
}
91349134

9135-
auto task = std::make_shared<ExportPartTask>(*this, manifest, getContext());
9135+
auto context_copy = Context::createCopy(getContext());
9136+
context_copy->makeQueryContextForExportPart();
9137+
context_copy->setCurrentQueryId(manifest.transaction_id);
9138+
context_copy->setBackgroundOperationTypeForContext(ClientInfo::BackgroundOperationType::EXPORT_PART);
9139+
9140+
auto task = std::make_shared<ExportPartTask>(*this, manifest, context_copy);
91369141

91379142
manifest.in_progress = assignee.scheduleMoveTask(task);
91389143

0 commit comments

Comments
 (0)