Skip to content

Commit b957bf7

Browse files
committed
Break persistent locks on scheme tx v2
1 parent a5a96d9 commit b957bf7

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

ydb/core/tx/datashard/alter_cdc_stream_unit.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "datashard_impl.h"
2+
#include "datashard_locks_db.h"
23
#include "datashard_pipeline.h"
34
#include "execution_unit_ctors.h"
45

@@ -69,7 +70,8 @@ class TAlterCdcStreamUnit : public TExecutionUnit {
6970
}
7071

7172
Y_ABORT_UNLESS(tableInfo);
72-
DataShard.AddUserTable(pathId, tableInfo);
73+
TDataShardLocksDb locksDb(DataShard, txc);
74+
DataShard.AddUserTable(pathId, tableInfo, &locksDb);
7375

7476
if (tableInfo->NeedSchemaSnapshots()) {
7577
DataShard.AddSchemaSnapshot(pathId, version, op->GetStep(), op->GetTxId(), txc, ctx);

ydb/core/tx/datashard/finalize_build_index_unit.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "datashard_impl.h"
2+
#include "datashard_locks_db.h"
23
#include "datashard_pipeline.h"
34
#include "execution_unit_ctors.h"
45

@@ -56,7 +57,8 @@ class TFinalizeBuildIndexUnit : public TExecutionUnit {
5657
}
5758

5859
Y_ABORT_UNLESS(tableInfo);
59-
DataShard.AddUserTable(pathId, tableInfo);
60+
TDataShardLocksDb locksDb(DataShard, txc);
61+
DataShard.AddUserTable(pathId, tableInfo, &locksDb);
6062

6163
if (tableInfo->NeedSchemaSnapshots()) {
6264
DataShard.AddSchemaSnapshot(pathId, version, op->GetStep(), op->GetTxId(), txc, ctx);

0 commit comments

Comments
 (0)