Skip to content

Commit fa4c87c

Browse files
authored
Fix merge artifact (#6997)
1 parent 86bca72 commit fa4c87c

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

ydb/core/tx/schemeshard/schemeshard__operation_apply_build_index.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ TVector<ISubOperation::TPtr> CancelBuildIndex(TOperationId nextId, const TTxTran
133133
TPath index = table.Child(indexName);
134134
auto tableIndexDropping = TransactionTemplate(table.PathString(), NKikimrSchemeOp::EOperationType::ESchemeOpDropTableIndex);
135135
auto operation = tableIndexDropping.MutableDrop();
136-
operation->SetName(ToString(index.Base()->Name));
136+
operation->SetName(index.Base()->Name);
137137

138138
result.push_back(CreateDropTableIndex(NextPartId(nextId, result), tableIndexDropping));
139139
}

ydb/core/tx/schemeshard/schemeshard__operation_drop_table.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -530,9 +530,13 @@ class TDropTable: public TSubOperation {
530530
if (parent.Base()->IsTableIndex()) {
531531
checks
532532
.IsTableIndex()
533-
.IsInsideTableIndexPath()
534-
.IsUnderDeleting()
535-
.IsUnderTheSameOperation(OperationId.GetTxId()); //allow only as part of drop base table
533+
.IsInsideTableIndexPath();
534+
// Not tmp index impl tables can be dropped only as part of drop index
535+
if (!NTableIndex::IsTmpImplTable(name)) {
536+
checks
537+
.IsUnderDeleting()
538+
.IsUnderTheSameOperation(OperationId.GetTxId());
539+
}
536540
} else {
537541
checks
538542
.IsLikeDirectory()

ydb/core/tx/schemeshard/schemeshard_path_describer.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1288,8 +1288,12 @@ void TSchemeShard::DescribeTableIndex(const TPathId& pathId, const TString& name
12881288

12891289
auto indexPath = *PathsById.FindPtr(pathId);
12901290
Y_ABORT_UNLESS(indexPath);
1291-
const ui8 expectedIndexImplTableCount = indexInfo->Type == NKikimrSchemeOp::EIndexType::EIndexTypeGlobalVectorKmeansTree ? 2 : 1;
1292-
Y_ABORT_UNLESS(indexPath->GetChildren().size() == expectedIndexImplTableCount);
1291+
if (indexInfo->Type == NKikimrSchemeOp::EIndexType::EIndexTypeGlobalVectorKmeansTree) {
1292+
// For vector index we have 4 impl tables on build stage and 2 impl tables when it's ready
1293+
Y_ABORT_UNLESS(indexPath->GetChildren().size() == 4 || indexPath->GetChildren().size() == 2);
1294+
} else {
1295+
Y_ABORT_UNLESS(indexPath->GetChildren().size() == 1);
1296+
}
12931297

12941298
ui64 dataSize = 0;
12951299
for (const auto& indexImplTablePathId : indexPath->GetChildren()) {

0 commit comments

Comments
 (0)