aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsnaury <snaury@ydb.tech>2022-10-20 14:06:33 +0300
committersnaury <snaury@ydb.tech>2022-10-20 14:06:33 +0300
commite177fa48230b9fa057146c9f100c3308840634d2 (patch)
tree9e87b8d9f36f4ba7487ce036856dcaaeadf11ac2
parent5641db0688031cf4221ae530ad1afbc831919a65 (diff)
downloadydb-e177fa48230b9fa057146c9f100c3308840634d2.tar.gz
Don't change StepCreated in alter operations
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__operation_alter_fs.cpp2
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__operation_alter_index.cpp2
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__operation_common.h18
3 files changed, 12 insertions, 10 deletions
diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_alter_fs.cpp b/ydb/core/tx/schemeshard/schemeshard__operation_alter_fs.cpp
index b602718eb5..81a9394572 100644
--- a/ydb/core/tx/schemeshard/schemeshard__operation_alter_fs.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard__operation_alter_fs.cpp
@@ -160,10 +160,8 @@ public:
TPathElement::TPtr path = context.SS->PathsById.at(pathId);
path->PathState = TPathElement::EPathState::EPathStateNoChanges;
- path->StepCreated = step;
NIceDb::TNiceDb db(context.GetDB());
- context.SS->PersistCreateStep(db, pathId, step);
fs->FinishAlter();
diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_alter_index.cpp b/ydb/core/tx/schemeshard/schemeshard__operation_alter_index.cpp
index 25aa7885e4..10c95ac352 100644
--- a/ydb/core/tx/schemeshard/schemeshard__operation_alter_index.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard__operation_alter_index.cpp
@@ -41,8 +41,6 @@ public:
TPathId pathId = txState->TargetPathId;
TPathElement::TPtr path = context.SS->PathsById.at(pathId);
- path->StepCreated = step;
- context.SS->PersistCreateStep(db, path->PathId, step);
Y_VERIFY(context.SS->Indexes.contains(path->PathId));
TTableIndexInfo::TPtr indexData = context.SS->Indexes.at(path->PathId);
diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_common.h b/ydb/core/tx/schemeshard/schemeshard__operation_common.h
index 77ad8c9b0b..413f18d866 100644
--- a/ydb/core/tx/schemeshard/schemeshard__operation_common.h
+++ b/ydb/core/tx/schemeshard/schemeshard__operation_common.h
@@ -407,8 +407,10 @@ public:
NIceDb::TNiceDb db(context.GetDB());
- path->StepCreated = step;
- context.SS->PersistCreateStep(db, pathId, step);
+ if (path->StepCreated == InvalidStepId) {
+ path->StepCreated = step;
+ context.SS->PersistCreateStep(db, pathId, step);
+ }
Y_VERIFY(context.SS->SubDomains.contains(pathId));
auto subDomain = context.SS->SubDomains.at(pathId);
@@ -1183,8 +1185,10 @@ public:
NIceDb::TNiceDb db(context.GetDB());
- path->StepCreated = step;
- context.SS->PersistCreateStep(db, pathId, step);
+ if (path->StepCreated == InvalidStepId) {
+ path->StepCreated = step;
+ context.SS->PersistCreateStep(db, pathId, step);
+ }
if (txState->TxType == TTxState::TxCreatePQGroup || txState->TxType == TTxState::TxAllocatePQ) {
auto parentDir = context.SS->PathsById.at(path->ParentPathId);
@@ -1390,8 +1394,10 @@ public:
NIceDb::TNiceDb db(context.GetDB());
- path->StepCreated = step;
- context.SS->PersistCreateStep(db, pathId, step);
+ if (path->StepCreated == InvalidStepId) {
+ path->StepCreated = step;
+ context.SS->PersistCreateStep(db, pathId, step);
+ }
TBlockStoreVolumeInfo::TPtr volume = context.SS->BlockStoreVolumes.at(pathId);