aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsvc <svc@yandex-team.ru>2022-03-18 14:18:51 +0300
committersvc <svc@yandex-team.ru>2022-03-18 14:18:51 +0300
commitf0d8005960eb82e1a95c34577b3a8bd3cb3186cb (patch)
treeca846e8a1137d2fa5f9caad48f5322ab4dabece7
parent5bd998ac643c3d0edcac464216d3728317f8822e (diff)
downloadydb-f0d8005960eb82e1a95c34577b3a8bd3cb3186cb.tar.gz
YDBOPS-4341 remove move flag
ref:4505239d04062852f12b6b5f695957ed9d68d91d
-rw-r--r--ydb/core/kqp/ut/common/kqp_ut_common.cpp1
-rw-r--r--ydb/core/testlib/basics/feature_flags.h1
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__operation.cpp9
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__operation_drop_indexed_table.cpp12
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__operation_drop_table.cpp14
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__operation_move_table.cpp15
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__operation_move_table_index.cpp15
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__operation_move_tables.cpp5
-rw-r--r--ydb/core/tx/schemeshard/schemeshard_impl.cpp13
-rw-r--r--ydb/core/tx/schemeshard/schemeshard_impl.h1
-rw-r--r--ydb/core/tx/schemeshard/ut_helpers/helpers.cpp12
-rw-r--r--ydb/core/tx/schemeshard/ut_helpers/helpers.h4
-rw-r--r--ydb/core/tx/schemeshard/ut_helpers/ls_checks.cpp4
-rw-r--r--ydb/core/tx/schemeshard/ut_helpers/test_env.cpp2
-rw-r--r--ydb/core/tx/schemeshard/ut_helpers/test_env.h1
-rw-r--r--ydb/core/tx/schemeshard/ut_move.cpp55
-rw-r--r--ydb/core/tx/schemeshard/ut_move_reboots.cpp37
-rw-r--r--ydb/services/ydb/ydb_common_ut.h1
18 files changed, 58 insertions, 144 deletions
diff --git a/ydb/core/kqp/ut/common/kqp_ut_common.cpp b/ydb/core/kqp/ut/common/kqp_ut_common.cpp
index 9bc7889f92f..c9f16926503 100644
--- a/ydb/core/kqp/ut/common/kqp_ut_common.cpp
+++ b/ydb/core/kqp/ut/common/kqp_ut_common.cpp
@@ -107,7 +107,6 @@ TKikimrRunner::TKikimrRunner(const TKikimrSettings& settings) {
ServerSettings->SetEnableDataColumnForIndexTable(true);
ServerSettings->SetKeepSnapshotTimeout(settings.KeepSnapshotTimeout);
ServerSettings->SetFrFactory(&UdfFrFactory);
- ServerSettings->SetEnableSchemeTransactionsAtSchemeShard(true);
ServerSettings->SetEnableNotNullColumns(true);
if (settings.LogStream)
ServerSettings->SetLogBackend(new TStreamLogBackend(settings.LogStream));
diff --git a/ydb/core/testlib/basics/feature_flags.h b/ydb/core/testlib/basics/feature_flags.h
index c78752dad18..6720558f0e9 100644
--- a/ydb/core/testlib/basics/feature_flags.h
+++ b/ydb/core/testlib/basics/feature_flags.h
@@ -28,7 +28,6 @@ public:
FEATURE_FLAG_SETTER(EnableAsyncIndexes)
FEATURE_FLAG_SETTER(EnableOlapSchemaOperations)
FEATURE_FLAG_SETTER(EnableMvccSnapshotReads)
- FEATURE_FLAG_SETTER(EnableSchemeTransactionsAtSchemeShard)
FEATURE_FLAG_SETTER(EnableBackgroundCompaction)
FEATURE_FLAG_SETTER(EnableBackgroundCompactionServerless)
FEATURE_FLAG_SETTER(EnableNotNullColumns)
diff --git a/ydb/core/tx/schemeshard/schemeshard__operation.cpp b/ydb/core/tx/schemeshard/schemeshard__operation.cpp
index cdd5f0ba73f..0637f48fc08 100644
--- a/ydb/core/tx/schemeshard/schemeshard__operation.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard__operation.cpp
@@ -99,15 +99,6 @@ THolder<TProposeResponse> TSchemeShard::IgniteOperation(TProposeRequest& request
context.UserToken.Reset(new NACLib::TUserToken(tokenPb));
}
- if (!EnableSchemeTransactionsAtSchemeShard && record.TransactionSize() > 1) {
- response.Reset(new TEvSchemeShard::TEvModifySchemeTransactionResult(
- NKikimrScheme::StatusInvalidParameter, ui64(txId), ui64(selfId)));
- response->SetError(NKikimrScheme::StatusInvalidParameter,
- "Do not accept several transactions as one until EnableSchemeTransactionsAtSchemeShard isn't set");
- Operations.erase(operation->GetTxId());
- return std::move(response);
- }
-
for (const auto& transaction: record.GetTransaction()) {
auto quotaResult = operation->ConsumeQuota(transaction, context);
if (quotaResult.Status != NKikimrScheme::StatusSuccess) {
diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_drop_indexed_table.cpp b/ydb/core/tx/schemeshard/schemeshard__operation_drop_indexed_table.cpp
index 7064fabe1ea..5e81fba2b6a 100644
--- a/ydb/core/tx/schemeshard/schemeshard__operation_drop_indexed_table.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard__operation_drop_indexed_table.cpp
@@ -92,17 +92,9 @@ public:
TPath path = TPath::Init(txState->TargetPathId, context.SS);
Y_VERIFY(path.IsResolved());
- if (context.SS->EnableSchemeTransactionsAtSchemeShard) {
- // only persist step, but do not set it for the path
- NextState = TTxState::WaitShadowPathPublication;
- context.SS->ChangeTxState(db, OperationId, TTxState::WaitShadowPathPublication);
- return true;
- }
- DropPath(db, context, OperationId, *txState, path);
-
- NextState = TTxState::Done;
- context.SS->ChangeTxState(db, OperationId, TTxState::Done);
+ NextState = TTxState::WaitShadowPathPublication;
+ context.SS->ChangeTxState(db, OperationId, TTxState::WaitShadowPathPublication);
return true;
}
diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_drop_table.cpp b/ydb/core/tx/schemeshard/schemeshard__operation_drop_table.cpp
index 45730be4095..3b5ffa4b76d 100644
--- a/ydb/core/tx/schemeshard/schemeshard__operation_drop_table.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard__operation_drop_table.cpp
@@ -197,18 +197,8 @@ public:
txState->PlanStep = step;
context.SS->PersistTxPlanStep(db, OperationId, step);
- if (context.SS->EnableSchemeTransactionsAtSchemeShard) {
-
- // only persist step, but do not set drop plan step for the path
- NextState = TTxState::WaitShadowPathPublication;
- context.SS->ChangeTxState(db, OperationId, TTxState::WaitShadowPathPublication);
- return true;
- }
-
- DropPath(db, context, OperationId, *txState, path);
-
- NextState = TTxState::ProposedWaitParts;
- context.SS->ChangeTxState(db, OperationId, TTxState::ProposedWaitParts);
+ NextState = TTxState::WaitShadowPathPublication;
+ context.SS->ChangeTxState(db, OperationId, TTxState::WaitShadowPathPublication);
return true;
}
diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_move_table.cpp b/ydb/core/tx/schemeshard/schemeshard__operation_move_table.cpp
index fc39ce04ba3..b657f792c91 100644
--- a/ydb/core/tx/schemeshard/schemeshard__operation_move_table.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard__operation_move_table.cpp
@@ -244,19 +244,8 @@ public:
dstPath.Activate();
IncParentDirAlterVersionWithRepublish(OperationId, dstPath, context);
- if (context.SS->EnableSchemeTransactionsAtSchemeShard) {
- // only persist step, but do not set drop step for the src path, wait for replacement publication first
- NextState = TTxState::WaitShadowPathPublication;
- context.SS->ChangeTxState(db, OperationId, TTxState::WaitShadowPathPublication);
- return true;
- }
-
- MarkSrcDropped(db, context, OperationId, *txState, srcPath);
-
- Y_VERIFY(!context.SS->TablesWithSnaphots.contains(srcPath.Base()->PathId));
-
- NextState = TTxState::ProposedWaitParts;
- context.SS->ChangeTxState(db, OperationId, TTxState::ProposedWaitParts);
+ NextState = TTxState::WaitShadowPathPublication;
+ context.SS->ChangeTxState(db, OperationId, TTxState::WaitShadowPathPublication);
return true;
}
diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_move_table_index.cpp b/ydb/core/tx/schemeshard/schemeshard__operation_move_table_index.cpp
index 9d03d70c7c5..fffcad1ea24 100644
--- a/ydb/core/tx/schemeshard/schemeshard__operation_move_table_index.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard__operation_move_table_index.cpp
@@ -75,19 +75,8 @@ public:
dstPath.Activate();
IncParentDirAlterVersionWithRepublish(OperationId, dstPath, context);
- if (context.SS->EnableSchemeTransactionsAtSchemeShard) {
- // only persist step, but do not set it for the src path
- NextState = TTxState::WaitShadowPathPublication;
- context.SS->ChangeTxState(db, OperationId, TTxState::WaitShadowPathPublication);
- return true;
- }
-
- MarkSrcDropped(db, context, OperationId, *txState, srcPath);
-
- Y_VERIFY(!context.SS->TablesWithSnaphots.contains(srcPath.Base()->PathId));
-
- NextState = TTxState::Done;
- context.SS->ChangeTxState(db, OperationId, TTxState::Done);
+ NextState = TTxState::WaitShadowPathPublication;
+ context.SS->ChangeTxState(db, OperationId, TTxState::WaitShadowPathPublication);
return true;
}
diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_move_tables.cpp b/ydb/core/tx/schemeshard/schemeshard__operation_move_tables.cpp
index 84035116361..c133ce1adf2 100644
--- a/ydb/core/tx/schemeshard/schemeshard__operation_move_tables.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard__operation_move_tables.cpp
@@ -47,11 +47,6 @@ TVector<ISubOperationBase::TPtr> CreateConsistentMoveTable(TOperationId nextId,
TVector<ISubOperationBase::TPtr> result;
- if (!context.SS->EnableSchemeTransactionsAtSchemeShard) {
- return {CreateReject(nextId, NKikimrScheme::EStatus::StatusInvalidParameter,
- "Do not accept move table operation until EnableSchemeTransactionsAtSchemeShard isn't set")};
- }
-
{
TString errStr;
if (!context.SS->CheckApplyIf(tx, errStr)) {
diff --git a/ydb/core/tx/schemeshard/schemeshard_impl.cpp b/ydb/core/tx/schemeshard/schemeshard_impl.cpp
index 5053932b6cd..f0df5fa4542 100644
--- a/ydb/core/tx/schemeshard/schemeshard_impl.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard_impl.cpp
@@ -3657,7 +3657,6 @@ TSchemeShard::TSchemeShard(const TActorId &tablet, TTabletStorageInfo *info)
, ShardDeleter(info->TabletID)
, AllowDataColumnForIndexTable(0, 0, 1)
, EnableAsyncIndexes(0, 0, 1)
- , EnableSchemeTransactionsAtSchemeShard(0, 0, 1)
{
TabletCountersPtr.Reset(new TProtobufTabletCounters<
ESimpleCounters_descriptor,
@@ -3781,9 +3780,6 @@ void TSchemeShard::OnActivateExecutor(const TActorContext &ctx) {
EnableAsyncIndexes = appData->FeatureFlags.GetEnableAsyncIndexes();
appData->Icb->RegisterSharedControl(EnableAsyncIndexes, "SchemeShard_EnableAsyncIndexes");
- EnableSchemeTransactionsAtSchemeShard = appData->FeatureFlags.GetEnableSchemeTransactionsAtSchemeShard();
- appData->Icb->RegisterSharedControl(EnableSchemeTransactionsAtSchemeShard, "SchemeShard_EnableSchemeTransactionsAtSchemeShard");
-
for (const auto& sid : appData->MeteringConfig.GetSystemBackupSIDs()) {
SystemBackupSIDs.insert(sid);
}
@@ -5978,15 +5974,6 @@ void TSchemeShard::ApplyConsoleConfigs(const NKikimrConfig::TFeatureFlags& featu
AllowServerlessStorageBilling = (i64)featureFlags.GetAllowServerlessStorageBillingForSchemeShard();
}
- if (featureFlags.GetEnableSchemeTransactionsAtSchemeShard() != (bool)EnableSchemeTransactionsAtSchemeShard) {
- LOG_NOTICE_S(ctx, NKikimrServices::FLAT_TX_SCHEMESHARD,
- "ApplyConsoleConfigs: EnableSchemeTransactionsAtSchemeShard has been changed"
- << ", schemeshardId: " << SelfTabletId()
- << ", old: " << (bool)EnableSchemeTransactionsAtSchemeShard
- << ", new: " << (bool)featureFlags.GetEnableSchemeTransactionsAtSchemeShard());
- EnableSchemeTransactionsAtSchemeShard = (i64)featureFlags.GetEnableSchemeTransactionsAtSchemeShard();
- }
-
EnableBackgroundCompaction = featureFlags.GetEnableBackgroundCompaction();
EnableBackgroundCompactionServerless = featureFlags.GetEnableBackgroundCompactionServerless();
}
diff --git a/ydb/core/tx/schemeshard/schemeshard_impl.h b/ydb/core/tx/schemeshard/schemeshard_impl.h
index 80713005be2..07f58ad7d02 100644
--- a/ydb/core/tx/schemeshard/schemeshard_impl.h
+++ b/ydb/core/tx/schemeshard/schemeshard_impl.h
@@ -967,7 +967,6 @@ public:
// namespace NIndexBuilder {
TControlWrapper AllowDataColumnForIndexTable;
TControlWrapper EnableAsyncIndexes;
- TControlWrapper EnableSchemeTransactionsAtSchemeShard;
THashMap<TIndexBuildId, TIndexBuildInfo::TPtr> IndexBuilds;
THashMap<TString, TIndexBuildInfo::TPtr> IndexBuildsByUid;
diff --git a/ydb/core/tx/schemeshard/ut_helpers/helpers.cpp b/ydb/core/tx/schemeshard/ut_helpers/helpers.cpp
index 6f999b268bb..26785e4e50f 100644
--- a/ydb/core/tx/schemeshard/ut_helpers/helpers.cpp
+++ b/ydb/core/tx/schemeshard/ut_helpers/helpers.cpp
@@ -2055,4 +2055,16 @@ namespace NSchemeShardUT_Private {
runtime.SetObserverFunc(prevObserver);
}
+
+ NKikimrTxDataShard::TEvCompactTableResult CompactTable(
+ TTestActorRuntime& runtime, ui64 shardId, const TTableId& tableId, bool compactBorrowed)
+ {
+ auto sender = runtime.AllocateEdgeActor();
+ auto request = MakeHolder<TEvDataShard::TEvCompactTable>(tableId.PathId);
+ request->Record.SetCompactBorrowed(compactBorrowed);
+ runtime.SendToPipe(shardId, sender, request.Release(), 0, GetPipeConfigWithRetries());
+
+ auto ev = runtime.GrabEdgeEventRethrow<TEvDataShard::TEvCompactTableResult>(sender);
+ return ev->Get()->Record;
+ }
}
diff --git a/ydb/core/tx/schemeshard/ut_helpers/helpers.h b/ydb/core/tx/schemeshard/ut_helpers/helpers.h
index 6b12c25534a..5fc35c4dc6a 100644
--- a/ydb/core/tx/schemeshard/ut_helpers/helpers.h
+++ b/ydb/core/tx/schemeshard/ut_helpers/helpers.h
@@ -465,4 +465,8 @@ namespace NSchemeShardUT_Private {
TTestActorRuntimeBase::TEventObserver SetSuppressObserver(TTestActorRuntime& runtime, TVector<THolder<IEventHandle>>& suppressed, ui32 type);
void WaitForSuppressed(TTestActorRuntime& runtime, TVector<THolder<IEventHandle>>& suppressed, ui32 count, TTestActorRuntime::TEventObserver prevObserver);
+
+ NKikimrTxDataShard::TEvCompactTableResult CompactTable(
+ TTestActorRuntime& runtime, ui64 shardId, const TTableId& tableId, bool compactBorrowed = false);
+
} //NSchemeShardUT_Private
diff --git a/ydb/core/tx/schemeshard/ut_helpers/ls_checks.cpp b/ydb/core/tx/schemeshard/ut_helpers/ls_checks.cpp
index 4560c2b96f2..d9c663ee54c 100644
--- a/ydb/core/tx/schemeshard/ut_helpers/ls_checks.cpp
+++ b/ydb/core/tx/schemeshard/ut_helpers/ls_checks.cpp
@@ -223,14 +223,14 @@ TCheckFunc DomainSettings(ui32 planResolution, ui32 timeCastBucketsPerMediator)
};
}
-TCheckFunc DatabaseSizeIs(ui64 bytes) {
+TCheckFunc DatabaseSizeIs(ui64 expectedBytes) {
return [=] (const NKikimrScheme::TEvDescribeSchemeResult& record) {
UNIT_ASSERT_VALUES_EQUAL(record.GetStatus(), NKikimrScheme::StatusSuccess);
const auto& pathDescr = record.GetPathDescription();
const auto& totalSize = pathDescr.GetDomainDescription().GetDiskSpaceUsage().GetTables().GetTotalSize();
- UNIT_ASSERT_VALUES_EQUAL(totalSize, bytes);
+ UNIT_ASSERT_VALUES_EQUAL(totalSize, expectedBytes);
};
}
diff --git a/ydb/core/tx/schemeshard/ut_helpers/test_env.cpp b/ydb/core/tx/schemeshard/ut_helpers/test_env.cpp
index 9cfd8037b7e..4aaefe81b8b 100644
--- a/ydb/core/tx/schemeshard/ut_helpers/test_env.cpp
+++ b/ydb/core/tx/schemeshard/ut_helpers/test_env.cpp
@@ -501,7 +501,6 @@ NSchemeShardUT_Private::TTestEnv::TTestEnv(TTestActorRuntime& runtime, const TTe
app.SetAllowUpdateChannelsBindingOfSolomonPartitions(opts.AllowUpdateChannelsBindingOfSolomonPartitions_);
app.SetEnableAsyncIndexes(opts.EnableAsyncIndexes_);
app.SetEnableNotNullColumns(opts.EnableNotNullColumns_);
- app.SetEnableSchemeTransactionsAtSchemeShard(opts.EnableSchemeTransactionsAtSchemeShard_);
app.SetEnableOlapSchemaOperations(opts.EnableOlapSchemaOperations_);
app.SetEnableProtoSourceIdInfo(opts.EnableProtoSourceIdInfo_);
app.SetEnableBackgroundCompaction(opts.EnableBackgroundCompaction_);
@@ -1008,6 +1007,5 @@ NSchemeShardUT_Private::TTestEnvOptions NSchemeShardUT_Private::TTestWithReboots
.EnablePipeRetries(false)
.EnableAsyncIndexes(true)
.EnableNotNullColumns(true)
- .EnableSchemeTransactionsAtSchemeShard(true)
.EnableProtoSourceIdInfo(true);
}
diff --git a/ydb/core/tx/schemeshard/ut_helpers/test_env.h b/ydb/core/tx/schemeshard/ut_helpers/test_env.h
index 72b934c570d..b3984f7b828 100644
--- a/ydb/core/tx/schemeshard/ut_helpers/test_env.h
+++ b/ydb/core/tx/schemeshard/ut_helpers/test_env.h
@@ -38,7 +38,6 @@ namespace NSchemeShardUT_Private {
OPTION(std::optional<bool>, AllowUpdateChannelsBindingOfSolomonPartitions, std::nullopt);
OPTION(std::optional<bool>, EnableAsyncIndexes, std::nullopt);
OPTION(std::optional<bool>, EnableNotNullColumns, std::nullopt);
- OPTION(std::optional<bool>, EnableSchemeTransactionsAtSchemeShard, std::nullopt);
OPTION(std::optional<bool>, EnableOlapSchemaOperations, std::nullopt);
OPTION(std::optional<bool>, EnableProtoSourceIdInfo, std::nullopt);
OPTION(std::optional<bool>, EnableBackgroundCompaction, std::nullopt);
diff --git a/ydb/core/tx/schemeshard/ut_move.cpp b/ydb/core/tx/schemeshard/ut_move.cpp
index 63274160aa1..d021c6dd721 100644
--- a/ydb/core/tx/schemeshard/ut_move.cpp
+++ b/ydb/core/tx/schemeshard/ut_move.cpp
@@ -18,43 +18,6 @@ Y_UNIT_TEST_SUITE(TSchemeShardMoveTest) {
TTestEnv env(runtime);
}
- Y_UNIT_TEST(FeatureFlagReject) {
- TTestBasicRuntime runtime;
- TTestEnv env(runtime,
- TTestEnvOptions()
- .EnableAsyncIndexes(true)
- .EnableSchemeTransactionsAtSchemeShard(false));
- ui64 txId = 100;
-
- TestCreateTable(runtime, ++txId, "/MyRoot", R"(
- Name: "Table1"
- Columns { Name: "key" Type: "Uint64" }
- Columns { Name: "value0" Type: "Utf8" }
- Columns { Name: "value1" Type: "Utf8" }
- KeyColumnNames: ["key"]
- )");
- env.TestWaitNotification(runtime, txId);
-
- TestCreateTable(runtime, ++txId, "/MyRoot", R"(
- Name: "Table2"
- Columns { Name: "key" Type: "Uint64" }
- Columns { Name: "value0" Type: "Utf8" }
- Columns { Name: "value1" Type: "Utf8" }
- KeyColumnNames: ["key"]
- )");
- env.TestWaitNotification(runtime, txId);
-
- {
- ++txId;
- auto first = MoveTableRequest(txId, "/MyRoot/Table1", "/MyRoot/Moved1");
- auto second = MoveTableRequest(txId, "/MyRoot/Table2", "/MyRoot/Moved2");
- auto combination = CombineSchemeTransactions({first, second});
-
- AsyncSendTransaction(runtime, TTestTxConfig::SchemeShard, combination);
- TestModificationResult(runtime, txId, NKikimrScheme::StatusInvalidParameter);
- }
- }
-
Y_UNIT_TEST(Reject) {
TTestBasicRuntime runtime;
TTestEnv env(runtime,
@@ -299,8 +262,7 @@ Y_UNIT_TEST_SUITE(TSchemeShardMoveTest) {
Y_UNIT_TEST(TwoTables) {
TTestBasicRuntime runtime;
TTestEnv env(runtime,
- TTestEnvOptions()
- .EnableSchemeTransactionsAtSchemeShard(true));
+ TTestEnvOptions());
ui64 txId = 100;
TestCreateTable(runtime, ++txId, "/MyRoot", R"(
@@ -368,8 +330,7 @@ Y_UNIT_TEST_SUITE(TSchemeShardMoveTest) {
TTestBasicRuntime runtime;
TTestEnv env(runtime,
TTestEnvOptions()
- .EnableAsyncIndexes(true)
- .EnableSchemeTransactionsAtSchemeShard(true));
+ .EnableAsyncIndexes(true));
ui64 txId = 100;
TestCreateIndexedTable(runtime, ++txId, "/MyRoot", R"(
@@ -497,8 +458,7 @@ Y_UNIT_TEST_SUITE(TSchemeShardMoveTest) {
TTestBasicRuntime runtime;
TTestEnv env(runtime,
TTestEnvOptions()
- .EnableAsyncIndexes(true)
- .EnableSchemeTransactionsAtSchemeShard(true));
+ .EnableAsyncIndexes(true));
ui64 txId = 100;
TestCreateIndexedTable(runtime, ++txId, "/MyRoot", R"(
@@ -578,8 +538,7 @@ Y_UNIT_TEST_SUITE(TSchemeShardMoveTest) {
TTestBasicRuntime runtime;
TTestEnv env(runtime,
TTestEnvOptions()
- .EnableAsyncIndexes(true)
- .EnableSchemeTransactionsAtSchemeShard(true));
+ .EnableAsyncIndexes(true));
ui64 txId = 100;
TestCreateTable(runtime, ++txId, "/MyRoot", R"(
@@ -706,8 +665,7 @@ Y_UNIT_TEST_SUITE(TSchemeShardMoveTest) {
TTestBasicRuntime runtime;
TTestEnv env(runtime,
TTestEnvOptions()
- .EnableAsyncIndexes(true)
- .EnableSchemeTransactionsAtSchemeShard(true));
+ .EnableAsyncIndexes(true));
ui64 txId = 100;
TestCreateIndexedTable(runtime, ++txId, "/MyRoot", R"(
@@ -774,8 +732,7 @@ Y_UNIT_TEST_SUITE(TSchemeShardMoveTest) {
TTestBasicRuntime runtime;
TTestEnv env(runtime,
TTestEnvOptions()
- .EnableAsyncIndexes(true)
- .EnableSchemeTransactionsAtSchemeShard(true));
+ .EnableAsyncIndexes(true));
ui64 txId = 100;
TestCreateIndexedTable(runtime, ++txId, "/MyRoot", R"(
diff --git a/ydb/core/tx/schemeshard/ut_move_reboots.cpp b/ydb/core/tx/schemeshard/ut_move_reboots.cpp
index 58e9bebd9ba..ad435303519 100644
--- a/ydb/core/tx/schemeshard/ut_move_reboots.cpp
+++ b/ydb/core/tx/schemeshard/ut_move_reboots.cpp
@@ -17,6 +17,7 @@ Y_UNIT_TEST_SUITE(TSchemeShardMoveRebootsTest) {
TTestBasicRuntime runtime;
TTestEnv env(runtime);
}
+
Y_UNIT_TEST(WithData) {
TTestWithReboots t;
@@ -50,9 +51,16 @@ Y_UNIT_TEST_SUITE(TSchemeShardMoveRebootsTest) {
fnWriteRow(TTestTxConfig::FakeHiveTablets);
pathVersion = TestDescribeResult(DescribePath(runtime, "/MyRoot"),
- {NLs::PathExist,
- NLs::ChildrenCount(2),
- NLs::ShardsInsideDomain(1)});
+ {NLs::PathExist,
+ NLs::ChildrenCount(2),
+ NLs::ShardsInsideDomain(1)});
+
+ auto tableVersion = TestDescribeResult(DescribePath(runtime, "/MyRoot/Table"),
+ {NLs::PathExist});
+ {
+ const auto result = CompactTable(runtime, TTestTxConfig::FakeHiveTablets, tableVersion.PathId);
+ UNIT_ASSERT_VALUES_EQUAL(result.GetStatus(), NKikimrTxDataShard::TEvCompactTableResult::OK);
+ }
{ //wait stats
TVector<THolder<IEventHandle>> suppressed;
@@ -66,7 +74,7 @@ Y_UNIT_TEST_SUITE(TSchemeShardMoveRebootsTest) {
}
TestDescribeResult(DescribePath(runtime, "/MyRoot"),
- {NLs::DatabaseSizeIs(624)});
+ {NLs::DatabaseSizeIs(120)});
}
@@ -98,7 +106,7 @@ Y_UNIT_TEST_SUITE(TSchemeShardMoveRebootsTest) {
}
TestDescribeResult(DescribePath(runtime, "/MyRoot"),
- {NLs::DatabaseSizeIs(624)});
+ {NLs::DatabaseSizeIs(120)});
}
});
}
@@ -137,9 +145,16 @@ Y_UNIT_TEST_SUITE(TSchemeShardMoveRebootsTest) {
fnWriteRow(TTestTxConfig::FakeHiveTablets);
pathVersion = TestDescribeResult(DescribePath(runtime, "/MyRoot"),
- {NLs::PathExist,
- NLs::ChildrenCount(2),
- NLs::ShardsInsideDomain(1)});
+ {NLs::PathExist,
+ NLs::ChildrenCount(2),
+ NLs::ShardsInsideDomain(1)});
+
+ auto tableVersion = TestDescribeResult(DescribePath(runtime, "/MyRoot/Table"),
+ {NLs::PathExist});
+ {
+ const auto result = CompactTable(runtime, TTestTxConfig::FakeHiveTablets, tableVersion.PathId);
+ UNIT_ASSERT_VALUES_EQUAL(result.GetStatus(), NKikimrTxDataShard::TEvCompactTableResult::OK);
+ }
{ //wait stats
TVector<THolder<IEventHandle>> suppressed;
@@ -153,7 +168,7 @@ Y_UNIT_TEST_SUITE(TSchemeShardMoveRebootsTest) {
}
TestDescribeResult(DescribePath(runtime, "/MyRoot"),
- {NLs::DatabaseSizeIs(624)});
+ {NLs::DatabaseSizeIs(120)});
}
@@ -161,7 +176,7 @@ Y_UNIT_TEST_SUITE(TSchemeShardMoveRebootsTest) {
{NKikimrScheme::StatusAccepted, NKikimrScheme::StatusMultipleModifications, NKikimrScheme::StatusPreconditionFailed});
TestDescribeResult(DescribePath(runtime, "/MyRoot"),
- {NLs::DatabaseSizeIs(624)});
+ {NLs::DatabaseSizeIs(120)});
t.TestEnv->TestWaitNotification(runtime, t.TxId);
@@ -188,7 +203,7 @@ Y_UNIT_TEST_SUITE(TSchemeShardMoveRebootsTest) {
}
TestDescribeResult(DescribePath(runtime, "/MyRoot"),
- {NLs::DatabaseSizeIs(624)});
+ {NLs::DatabaseSizeIs(120)});
}
});
}
diff --git a/ydb/services/ydb/ydb_common_ut.h b/ydb/services/ydb/ydb_common_ut.h
index c067928c785..426bdd213b8 100644
--- a/ydb/services/ydb/ydb_common_ut.h
+++ b/ydb/services/ydb/ydb_common_ut.h
@@ -76,7 +76,6 @@ public:
ServerSettings->SetEnableDataColumnForIndexTable(true);
ServerSettings->SetEnableNotNullColumns(true);
ServerSettings->SetEnableSystemViews(TestSettings::EnableSystemViews);
- ServerSettings->SetEnableSchemeTransactionsAtSchemeShard(true);
ServerSettings->SetEnableYq(enableYq);
ServerSettings->Formats = new TFormatFactory;
ServerSettings->PQConfig = appConfig.GetPQConfig();