diff options
author | snaury <snaury@ydb.tech> | 2022-10-20 14:06:33 +0300 |
---|---|---|
committer | snaury <snaury@ydb.tech> | 2022-10-20 14:06:33 +0300 |
commit | e177fa48230b9fa057146c9f100c3308840634d2 (patch) | |
tree | 9e87b8d9f36f4ba7487ce036856dcaaeadf11ac2 | |
parent | 5641db0688031cf4221ae530ad1afbc831919a65 (diff) | |
download | ydb-e177fa48230b9fa057146c9f100c3308840634d2.tar.gz |
Don't change StepCreated in alter operations
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); |