diff options
author | ivanmorozov333 <ivanmorozov@ydb.tech> | 2024-07-08 16:57:25 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-08 16:57:25 +0300 |
commit | 3e725cbf9fd98346052a818fead3eb3b9bf10354 (patch) | |
tree | 50103479fd33ebd27bb03214d424660a64267604 | |
parent | 7b59fef4b87276a539d87e08791efbe6a60edc0f (diff) | |
download | ydb-3e725cbf9fd98346052a818fead3eb3b9bf10354.tar.gz |
fix resharding tests implementation (#6388)
-rw-r--r-- | ydb/core/kqp/ut/olap/blobs_sharing_ut.cpp | 2 | ||||
-rw-r--r-- | ydb/core/tx/columnshard/hooks/testing/controller.cpp | 7 | ||||
-rw-r--r-- | ydb/core/tx/columnshard/hooks/testing/controller.h | 3 |
3 files changed, 2 insertions, 10 deletions
diff --git a/ydb/core/kqp/ut/olap/blobs_sharing_ut.cpp b/ydb/core/kqp/ut/olap/blobs_sharing_ut.cpp index 560482ca4c..1db187d82b 100644 --- a/ydb/core/kqp/ut/olap/blobs_sharing_ut.cpp +++ b/ydb/core/kqp/ut/olap/blobs_sharing_ut.cpp @@ -188,6 +188,7 @@ Y_UNIT_TEST_SUITE(KqpOlapBlobsSharing) { } CSTransferStatus->Reset(); AFL_VERIFY(!Controller->IsTrivialLinks()); + Controller->CheckInvariants(); } }; Y_UNIT_TEST(BlobsSharingSplit1_1) { @@ -401,6 +402,7 @@ Y_UNIT_TEST_SUITE(KqpOlapBlobsSharing) { auto alterResult = session.ExecuteSchemeQuery(alterQuery).GetValueSync(); UNIT_ASSERT_VALUES_UNEQUAL_C(alterResult.GetStatus(), NYdb::EStatus::SUCCESS, alterResult.GetIssues().ToString()); } + csController->CheckInvariants(); } }; diff --git a/ydb/core/tx/columnshard/hooks/testing/controller.cpp b/ydb/core/tx/columnshard/hooks/testing/controller.cpp index e47dc08dcd..80221a3697 100644 --- a/ydb/core/tx/columnshard/hooks/testing/controller.cpp +++ b/ydb/core/tx/columnshard/hooks/testing/controller.cpp @@ -12,10 +12,6 @@ namespace NKikimr::NYDBTest::NColumnShard { bool TController::DoOnWriteIndexComplete(const NOlap::TColumnEngineChanges& change, const ::NKikimr::NColumnShard::TColumnShard& shard) { TGuard<TMutex> g(Mutex); - if (SharingIds.empty()) { - TCheckContext context; - CheckInvariants(shard, context); - } return TBase::DoOnWriteIndexComplete(change, shard); } @@ -24,9 +20,6 @@ void TController::DoOnAfterGCAction(const ::NKikimr::NColumnShard::TColumnShard& for (auto d = action.GetBlobsToRemove().GetDirect().GetIterator(); d.IsValid(); ++d) { AFL_VERIFY(RemovedBlobIds[action.GetStorageId()][d.GetBlobId()].emplace(d.GetTabletId()).second); } -// if (SharingIds.empty()) { -// CheckInvariants(); -// } } void TController::CheckInvariants(const ::NKikimr::NColumnShard::TColumnShard& shard, TCheckContext& context) const { diff --git a/ydb/core/tx/columnshard/hooks/testing/controller.h b/ydb/core/tx/columnshard/hooks/testing/controller.h index c8211afb54..bb011d168d 100644 --- a/ydb/core/tx/columnshard/hooks/testing/controller.h +++ b/ydb/core/tx/columnshard/hooks/testing/controller.h @@ -177,9 +177,6 @@ protected: virtual void DoOnDataSharingFinished(const ui64 /*tabletId*/, const TString& sessionId) override { TGuard<TMutex> g(Mutex); AFL_VERIFY(SharingIds.erase(sessionId)); - if (SharingIds.empty()) { - CheckInvariants(); - } } virtual void DoOnDataSharingStarted(const ui64 /*tabletId*/, const TString& sessionId) override { // dont check here. on finish only |