From 2c42966dfaa380fb44a3a6b75ec7b5c1e73fdc96 Mon Sep 17 00:00:00 2001 From: Aleksei Uzhegov Date: Tue, 30 Jan 2024 14:29:16 +0300 Subject: [PATCH] Fixed PR comments #1 --- ..._operation_create_external_data_source.cpp | 33 +++++++++---------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_create_external_data_source.cpp b/ydb/core/tx/schemeshard/schemeshard__operation_create_external_data_source.cpp index 153744ca22a1..85780c48889d 100644 --- a/ydb/core/tx/schemeshard/schemeshard__operation_create_external_data_source.cpp +++ b/ydb/core/tx/schemeshard/schemeshard__operation_create_external_data_source.cpp @@ -5,9 +5,6 @@ #include -// #define LOG_I(stream) LOG_INFO_S (context.Ctx, NKikimrServices::FLAT_TX_SCHEMESHARD, "[" << context.SS->TabletID() << "] " << stream) -// #define LOG_N(stream) LOG_NOTICE_S(context.Ctx, NKikimrServices::FLAT_TX_SCHEMESHARD, "[" << context.SS->TabletID() << "] " << stream) - namespace { using namespace NKikimr; @@ -39,9 +36,9 @@ class TPropose: public TSubOperationState { Y_ABORT_UNLESS(txState); Y_ABORT_UNLESS(txState->TxType == TTxState::TxCreateExternalDataSource); - const auto pathId = txState->TargetPathId; - const auto path = TPath::Init(pathId, context.SS); - const auto pathPtr = context.SS->PathsById.at(pathId); + const auto pathId = txState->TargetPathId; + const auto path = TPath::Init(pathId, context.SS); + const TPathElement::TPtr pathPtr = context.SS->PathsById.at(pathId); context.SS->TabletCounters->Simple()[COUNTER_EXTERNAL_DATA_SOURCE_COUNT].Add(1); @@ -76,23 +73,23 @@ class TCreateExternalDataSource : public TSubOperation { TTxState::ETxState NextState(TTxState::ETxState state) const override { switch (state) { - case TTxState::Waiting: - case TTxState::Propose: - return TTxState::Done; - default: - return TTxState::Invalid; + case TTxState::Waiting: + case TTxState::Propose: + return TTxState::Done; + default: + return TTxState::Invalid; } } TSubOperationState::TPtr SelectStateFunc(TTxState::ETxState state) override { switch (state) { - case TTxState::Waiting: - case TTxState::Propose: - return MakeHolder(OperationId); - case TTxState::Done: - return MakeHolder(OperationId); - default: - return nullptr; + case TTxState::Waiting: + case TTxState::Propose: + return MakeHolder(OperationId); + case TTxState::Done: + return MakeHolder(OperationId); + default: + return nullptr; } }