@@ -265,17 +265,19 @@ THolder<TEvSchemeShard::TEvModifySchemeTransaction> DropBuildPropose(
265
265
auto propose = MakeHolder<TEvSchemeShard::TEvModifySchemeTransaction>(ui64 (buildInfo.ApplyTxId ), ss->TabletID ());
266
266
propose->Record .SetFailOnExist (true );
267
267
268
- auto path = TPath::Init (buildInfo.TablePathId , ss).Dive (buildInfo.IndexName );
268
+ auto path = TPath::Init (buildInfo.TablePathId , ss)
269
+ .Dive (buildInfo.IndexName )
270
+ .Dive (buildInfo.KMeans .WriteTo (true ));
269
271
270
272
NKikimrSchemeOp::TModifyScheme& modifyScheme = *propose->Record .AddTransaction ();
271
273
modifyScheme.SetInternal (true );
272
- modifyScheme.SetWorkingDir (path.PathString ());
273
- if (path.LockedBy ()) {
274
+ modifyScheme.SetWorkingDir (path.Parent (). PathString ());
275
+ if (path.IsLocked ()) {
274
276
modifyScheme.MutableLockGuard ()->SetOwnerTxId (ui64 (buildInfo.LockTxId ));
275
277
}
276
278
277
279
modifyScheme.SetOperationType (NKikimrSchemeOp::ESchemeOpDropTable);
278
- modifyScheme.MutableDrop ()->SetName (buildInfo. KMeans . WriteTo ( true ) );
280
+ modifyScheme.MutableDrop ()->SetName (path-> Name );
279
281
280
282
LOG_DEBUG_S ((TlsActivationContext->AsActorContext ()), NKikimrServices::BUILD_INDEX,
281
283
" DropBuildPropose " << buildInfo.Id << " " << buildInfo.State << " " << propose->Record .ShortDebugString ());
@@ -474,9 +476,7 @@ THolder<TEvSchemeShard::TEvModifySchemeTransaction> CancelPropose(
474
476
NKikimrSchemeOp::TModifyScheme& modifyScheme = *propose->Record .AddTransaction ();
475
477
modifyScheme.SetOperationType (NKikimrSchemeOp::ESchemeOpCancelIndexBuild);
476
478
modifyScheme.SetInternal (true );
477
-
478
479
modifyScheme.SetWorkingDir (TPath::Init (buildInfo.DomainPathId , ss).PathString ());
479
-
480
480
modifyScheme.MutableLockGuard ()->SetOwnerTxId (ui64 (buildInfo.LockTxId ));
481
481
482
482
auto & indexBuild = *modifyScheme.MutableCancelIndexBuild ();
@@ -1328,12 +1328,12 @@ struct TSchemeShard::TIndexBuilder::TTxProgress: public TSchemeShard::TIndexBuil
1328
1328
auto path = GetBuildPath (Self, buildInfo, buildInfo.KMeans .ReadFrom ());
1329
1329
table = Self->Tables .at (path->PathId );
1330
1330
1331
- if (!path.IsLocked ()) {
1332
- // lock is needed to prevent its shards from beeing split
1331
+ if (!path.IsLocked ()) { // lock is needed to prevent its shards from beeing split
1333
1332
ChangeState (buildInfo.Id , TIndexBuildInfo::EState::LockBuild);
1334
1333
Progress (buildInfo.Id );
1335
1334
return false ;
1336
1335
}
1336
+ Y_ASSERT (path.LockedBy () == buildInfo.LockTxId );
1337
1337
}
1338
1338
auto tableColumns = NTableIndex::ExtractInfo (table); // skip dropped columns
1339
1339
TSerializedTableRange shardRange = InfiniteRange (tableColumns.Keys .size ());
0 commit comments