Commit ec56ec6
committed
Set Coordination component for export partition completion handler
The previous commit covered the four `BackgroundSchedulePool` /
query-handler entry points that talk to ZooKeeper from the partition-
export feature, but missed the completion path. The part-export
completion callback is invoked from a `MergeTreeBackgroundExecutor`
thread, which does not inherit any thread-local component set by the
scheduling task. As a result, when
`enforce_keeper_component_tracking` is on, every Keeper request issued
from `ExportPartitionTaskScheduler::handlePartExportCompletion` (and
its callees `handlePartExportSuccess`,
`handlePartExportFailure`, `tryToMovePartToProcessed`,
`areAllPartsProcessed`) raises `LOGICAL_ERROR: Current component is
empty`, aborting the server in debug builds.
Observed on PR #1718 (commit `e239d42`):
- Stateless tests (amd_debug, sequential)
- Stateless tests (amd_asan, db disk, distributed plan, sequential)
- Stateless tests (amd_debug, distributed plan, s3 storage, sequential)
- Stateless tests (arm_binary, sequential)
- Stateless tests (arm_asan, azure, sequential)
- Many `test_export_replicated_mt_partition_to_*` integration tests
All show the same fatal stack ending in `tryToMovePartToProcessed` ->
`zkutil::ZooKeeper::tryGet`.
Wrap `handlePartExportCompletion` with `Coordination::setCurrentComponent`
to cover all four sub-paths in one place. Also wrap
`ExportPartFromPartitionExportTask::executeStep`, which is the same
threading model (a `MergeTreeBackgroundExecutor` task issuing
`zk->tryCreate`) and would fail identically when
`export_merge_tree_partition_lock_inside_the_task` is enabled.
CI: #17181 parent e239d42 commit ec56ec6
2 files changed
Lines changed: 8 additions & 0 deletions
File tree
- src/Storages/MergeTree
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
271 | 272 | | |
272 | 273 | | |
273 | 274 | | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
274 | 278 | | |
275 | 279 | | |
276 | 280 | | |
| |||
0 commit comments