Skip to content

Commit 53e9a69

Browse files
committed
fix
1 parent df8bd02 commit 53e9a69

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

ydb/core/tx/datashard/change_exchange_split.cpp

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -360,19 +360,21 @@ class TCdcWorker
360360
const auto partitionId = partition.GetPartitionId();
361361
const auto tabletId = partition.GetTabletId();
362362

363+
if (NKikimrPQ::ETopicPartitionStatus::Active != partition.GetStatus()) {
364+
continue;
365+
}
366+
363367
auto it = Workers.find(partitionId);
364-
if (NKikimrPQ::ETopicPartitionStatus::Active == partition.GetStatus()) {
365-
if (it != Workers.end()) {
366-
workers.emplace(partitionId, it->second);
367-
Workers.erase(it);
368-
} else {
369-
LOG_T("Register new worker"
370-
<< ": partitionId# " << partitionId);
371-
372-
const auto worker = Register(new TCdcPartitionWorker(SelfId(), partitionId, tabletId, SrcTabletId, DstTabletIds));
373-
workers.emplace(partitionId, worker);
374-
Pending.emplace(worker, partitionId);
375-
}
368+
if (it != Workers.end()) {
369+
workers.emplace(partitionId, it->second);
370+
Workers.erase(it);
371+
} else {
372+
LOG_T("Register new worker"
373+
<< ": partitionId# " << partitionId);
374+
375+
const auto worker = Register(new TCdcPartitionWorker(SelfId(), partitionId, tabletId, SrcTabletId, DstTabletIds));
376+
workers.emplace(partitionId, worker);
377+
Pending.emplace(worker, partitionId);
376378
}
377379
}
378380

0 commit comments

Comments
 (0)