Skip to content

Commit

Permalink
schemeshard thing
Browse files Browse the repository at this point in the history
  • Loading branch information
Enjection committed Sep 24, 2024
1 parent b403f25 commit ab423f8
Show file tree
Hide file tree
Showing 10 changed files with 106 additions and 170 deletions.
4 changes: 4 additions & 0 deletions ydb/core/protos/counters_schemeshard.proto
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ enum ESimpleCounters {
COUNTER_IN_FLIGHT_OPS_TxCreateResourcePool = 174 [(CounterOpts) = {Name: "InFlightOps/CreateResourcePool"}];
COUNTER_IN_FLIGHT_OPS_TxDropResourcePool = 175 [(CounterOpts) = {Name: "InFlightOps/DropResourcePool"}];
COUNTER_IN_FLIGHT_OPS_TxAlterResourcePool = 176 [(CounterOpts) = {Name: "InFlightOps/AlterResourcePool"}];

COUNTER_IN_FLIGHT_OPS_TxRestoreIncrementalBackupAtTable = 177 [(CounterOpts) = {Name: "InFlightOps/RestoreIncrementalBackupAtTable"}];
}

enum ECumulativeCounters {
Expand Down Expand Up @@ -351,6 +353,8 @@ enum ECumulativeCounters {
COUNTER_FINISHED_OPS_TxCreateResourcePool = 103 [(CounterOpts) = {Name: "FinishedOps/CreateResourcePool"}];
COUNTER_FINISHED_OPS_TxDropResourcePool = 104 [(CounterOpts) = {Name: "FinishedOps/DropResourcePool"}];
COUNTER_FINISHED_OPS_TxAlterResourcePool = 105 [(CounterOpts) = {Name: "FinishedOps/AlterResourcePool"}];

COUNTER_FINISHED_OPS_TxRestoreIncrementalBackupAtTable = 106 [(CounterOpts) = {Name: "FinishedOps/RestoreIncrementalBackupAtTable"}];
}

enum EPercentileCounters {
Expand Down
1 change: 1 addition & 0 deletions ydb/core/protos/flat_scheme_op.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1664,6 +1664,7 @@ enum EOperationType {
ESchemeOpAlterResourcePool = 102;

ESchemeOpRestoreIncrementalBackup = 103;
ESchemeOpRestoreIncrementalBackupAtTable = 104;
}

message TApplyIf {
Expand Down
5 changes: 5 additions & 0 deletions ydb/core/tx/schemeshard/schemeshard__operation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1190,6 +1190,9 @@ ISubOperation::TPtr TOperation::RestorePart(TTxState::ETxType txType, TTxState::
case TTxState::ETxType::TxAlterResourcePool:
return CreateAlterResourcePool(NextPartId(), txState);

case TTxState::ETxType::TxRestoreIncrementalBackupAtTable:
return CreateRestoreIncrementalBackupAtTable(NextPartId(), txState);

case TTxState::ETxType::TxInvalid:
Y_UNREACHABLE();
}
Expand Down Expand Up @@ -1441,6 +1444,8 @@ TVector<ISubOperation::TPtr> TOperation::ConstructParts(const TTxTransaction& tx
// IncrementalBackup
case NKikimrSchemeOp::EOperationType::ESchemeOpRestoreIncrementalBackup:
return CreateRestoreIncrementalBackup(NextPartId(), tx, context);
case NKikimrSchemeOp::EOperationType::ESchemeOpRestoreIncrementalBackupAtTable:
Y_ABORT("multipart operations are handled before, also they require transaction details");
}

Y_UNREACHABLE();
Expand Down
2 changes: 2 additions & 0 deletions ydb/core/tx/schemeshard/schemeshard__operation_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,8 @@ void NTableState::UpdatePartitioningForTableModification(TOperationId operationI
commonShardOp = TTxState::ConfigureParts;
} else if (txState.TxType == TTxState::TxDropCdcStreamAtTableDropSnapshot) {
commonShardOp = TTxState::ConfigureParts;
} else if (txState.TxType == TTxState::TxRestoreIncrementalBackupAtTable) {
commonShardOp = TTxState::ConfigureParts;
} else {
Y_ABORT("UNREACHABLE");
}
Expand Down
Loading

0 comments on commit ab423f8

Please sign in to comment.