Skip to content

Commit

Permalink
Fixed PR comments ydb-platform#1
Browse files Browse the repository at this point in the history
  • Loading branch information
Alnen committed Jan 30, 2024
1 parent 4f31f30 commit 2c42966
Showing 1 changed file with 15 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@

#include <ydb/core/base/subdomain.h>

// #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;
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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<TPropose>(OperationId);
case TTxState::Done:
return MakeHolder<TDone>(OperationId);
default:
return nullptr;
case TTxState::Waiting:
case TTxState::Propose:
return MakeHolder<TPropose>(OperationId);
case TTxState::Done:
return MakeHolder<TDone>(OperationId);
default:
return nullptr;
}
}

Expand Down

0 comments on commit 2c42966

Please sign in to comment.