diff options
| author | Nikolay Shestakov <[email protected]> | 2026-05-09 10:53:54 +0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-05-09 08:53:54 +0300 |
| commit | 6761f96fc86c53ed650ca4fc531cef16acabf37f (patch) | |
| tree | b87c0648f754e8b40a4774e209124866c04204e4 | |
| parent | c7fa74735e65a2e655bf5ab61c0815a89e34ed30 (diff) | |
Fixed tests in arcadia (cluster list table is not created) (#39906)
| -rw-r--r-- | ydb/core/persqueue/public/schema/alter_topic_operation.cpp | 7 | ||||
| -rw-r--r-- | ydb/core/persqueue/public/schema/common.cpp | 4 | ||||
| -rw-r--r-- | ydb/core/persqueue/public/schema/create_topic_operation.cpp | 8 |
3 files changed, 7 insertions, 12 deletions
diff --git a/ydb/core/persqueue/public/schema/alter_topic_operation.cpp b/ydb/core/persqueue/public/schema/alter_topic_operation.cpp index 55fd6d64261..099f703523d 100644 --- a/ydb/core/persqueue/public/schema/alter_topic_operation.cpp +++ b/ydb/core/persqueue/public/schema/alter_topic_operation.cpp @@ -31,7 +31,7 @@ public: } void OnException(const std::exception& exc) override { - ReplyAndDie(Ydb::StatusIds::INTERNAL_ERROR, exc.what()); + Send(ParentId, new TEvCreateTopicResponse(Ydb::StatusIds::INTERNAL_ERROR, exc.what(), NKikimrSchemeOp::TModifyScheme()), 0, Settings.Cookie); } private: @@ -99,10 +99,9 @@ private: << (ev->Get()->Success ? ev->Get()->ClustersList->DebugString() : "error")); auto& response = *ev->Get(); - if (!response.Success) { - return ReplyAndDie(Ydb::StatusIds::INTERNAL_ERROR, "Failed to get clusters list"); + if (response.Success) { + ClustersList = std::move(response.ClustersList); } - ClustersList = std::move(response.ClustersList); return DoAlter(); } diff --git a/ydb/core/persqueue/public/schema/common.cpp b/ydb/core/persqueue/public/schema/common.cpp index e43f9c104ef..416c3c4da81 100644 --- a/ydb/core/persqueue/public/schema/common.cpp +++ b/ydb/core/persqueue/public/schema/common.cpp @@ -37,12 +37,10 @@ TString GetLocalClusterName(NPQ::NClusterTracker::TClustersList::TConstPtr clust } TResult ValidateLocalCluster(NPQ::NClusterTracker::TClustersList::TConstPtr clustersList, const NKikimrPQ::TPQTabletConfig& config) { - if (AppData()->PQConfig.GetTopicsAreFirstClassCitizen()) { + if (AppData()->PQConfig.GetTopicsAreFirstClassCitizen() || !clustersList) { return {}; } - AFL_ENSURE(clustersList); - const auto localCluster = GetLocalClusterName(clustersList); const auto& cluster = config.GetDC(); diff --git a/ydb/core/persqueue/public/schema/create_topic_operation.cpp b/ydb/core/persqueue/public/schema/create_topic_operation.cpp index 1603a840c67..7a0a9fd8a37 100644 --- a/ydb/core/persqueue/public/schema/create_topic_operation.cpp +++ b/ydb/core/persqueue/public/schema/create_topic_operation.cpp @@ -36,7 +36,7 @@ public: } void OnException(const std::exception& exc) override { - ReplyAndDie(Ydb::StatusIds::INTERNAL_ERROR, exc.what()); + Send(ParentId, new TEvCreateTopicResponse(Ydb::StatusIds::INTERNAL_ERROR, exc.what(), NKikimrSchemeOp::TModifyScheme()), 0, Settings.Cookie); } private: @@ -50,12 +50,10 @@ private: LOG_D("Handle NPQ::NClusterTracker::TEvClusterTracker::TEvGetClustersListResponse"); auto& response = *ev->Get(); - if (!response.Success) { - return ReplyAndDie(Ydb::StatusIds::INTERNAL_ERROR, "Failed to get clusters list"); + if (response.Success) { + ClustersList = std::move(response.ClustersList); } - ClustersList = std::move(response.ClustersList); - return DoCreate(); } |
