@@ -1239,7 +1239,72 @@ bool TSchemeShard::CheckApplyIf(const NKikimrSchemeOp::TModifyScheme &scheme, TS
1239
1239
1240
1240
if (item.HasPathVersion ()) {
1241
1241
const auto requiredVersion = item.GetPathVersion ();
1242
- const auto actualVersion = GetPathVersion (TPath::Init (pathId, this )).GetGeneralVersion ();
1242
+ arc_ui64 actualVersion;
1243
+ auto path = TPath::Init (pathId, this );
1244
+ auto pathVersion = GetPathVersion (path);
1245
+
1246
+ if (item.HasCheckEntityVersion () && item.GetCheckEntityVersion ()) {
1247
+ switch (path.Base ()->PathType ) {
1248
+ case NKikimrSchemeOp::EPathTypePersQueueGroup:
1249
+ actualVersion = pathVersion.GetPQVersion ();
1250
+ break ;
1251
+ case NKikimrSchemeOp::EPathType::EPathTypeSubDomain:
1252
+ case NKikimrSchemeOp::EPathType::EPathTypeExtSubDomain:
1253
+ actualVersion = pathVersion.GetSubDomainVersion ();
1254
+ break ;
1255
+ case NKikimrSchemeOp::EPathTypeTable:
1256
+ actualVersion = pathVersion.GetTableSchemaVersion ();
1257
+ break ;
1258
+ case NKikimrSchemeOp::EPathType::EPathTypeBlockStoreVolume:
1259
+ actualVersion = pathVersion.GetBSVVersion ();
1260
+ break ;
1261
+ case NKikimrSchemeOp::EPathType::EPathTypeFileStore:
1262
+ actualVersion = pathVersion.GetFileStoreVersion ();
1263
+ break ;
1264
+ case NKikimrSchemeOp::EPathType::EPathTypeKesus:
1265
+ actualVersion = pathVersion.GetKesusVersion ();
1266
+ break ;
1267
+ case NKikimrSchemeOp::EPathType::EPathTypeRtmrVolume:
1268
+ actualVersion = pathVersion.GetRTMRVersion ();
1269
+ break ;
1270
+ case NKikimrSchemeOp::EPathType::EPathTypeSolomonVolume:
1271
+ actualVersion = pathVersion.GetSolomonVersion ();
1272
+ break ;
1273
+ case NKikimrSchemeOp::EPathType::EPathTypeTableIndex:
1274
+ actualVersion = pathVersion.GetTableIndexVersion ();
1275
+ break ;
1276
+ case NKikimrSchemeOp::EPathType::EPathTypeColumnStore:
1277
+ actualVersion = pathVersion.GetColumnStoreVersion ();
1278
+ break ;
1279
+ case NKikimrSchemeOp::EPathType::EPathTypeColumnTable:
1280
+ actualVersion = pathVersion.GetColumnTableVersion ();
1281
+ break ;
1282
+ case NKikimrSchemeOp::EPathType::EPathTypeCdcStream:
1283
+ actualVersion = pathVersion.GetCdcStreamVersion ();
1284
+ break ;
1285
+ case NKikimrSchemeOp::EPathType::EPathTypeSequence:
1286
+ actualVersion = pathVersion.GetSequenceVersion ();
1287
+ break ;
1288
+ case NKikimrSchemeOp::EPathType::EPathTypeReplication:
1289
+ actualVersion = pathVersion.GetReplicationVersion ();
1290
+ break ;
1291
+ case NKikimrSchemeOp::EPathType::EPathTypeExternalTable:
1292
+ actualVersion = pathVersion.GetExternalTableVersion ();
1293
+ break ;
1294
+ case NKikimrSchemeOp::EPathType::EPathTypeExternalDataSource:
1295
+ actualVersion = pathVersion.GetExternalDataSourceVersion ();
1296
+ break ;
1297
+ case NKikimrSchemeOp::EPathType::EPathTypeView:
1298
+ actualVersion = pathVersion.GetViewVersion ();
1299
+ break ;
1300
+ default :
1301
+ actualVersion = pathVersion.GetGeneralVersion ();
1302
+ break ;
1303
+ }
1304
+ } else {
1305
+ actualVersion = pathVersion.GetGeneralVersion ();
1306
+ }
1307
+
1243
1308
if (requiredVersion != actualVersion) {
1244
1309
errStr = TStringBuilder ()
1245
1310
<< " fail user constraint in ApplyIf section:"
0 commit comments