aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorilnaz <ilnaz@ydb.tech>2023-07-18 12:46:36 +0300
committerilnaz <ilnaz@ydb.tech>2023-07-18 12:46:36 +0300
commit67d2b492468af0b86c6beb12036de9675fa26904 (patch)
tree80f9df93aab8bf5f555d1aa4098d5ba669f2eb17
parentf125441214bd3771819c3f3242489b1b9471b10d (diff)
downloadydb-67d2b492468af0b86c6beb12036de9675fa26904.tar.gz
Get rid of unused code KIKIMR-18774
-rw-r--r--ydb/core/cms/config.h2
-rw-r--r--ydb/core/cms/sentinel.cpp40
-rw-r--r--ydb/core/cms/sentinel.h1
-rw-r--r--ydb/core/cms/sentinel_impl.h1
4 files changed, 11 insertions, 33 deletions
diff --git a/ydb/core/cms/config.h b/ydb/core/cms/config.h
index 21ec4721f17..049e0ca6510 100644
--- a/ydb/core/cms/config.h
+++ b/ydb/core/cms/config.h
@@ -23,8 +23,6 @@ struct TCmsSentinelConfig {
TDuration RetryChangeStatus;
ui32 ChangeStatusRetries;
- TDuration BSCBatchTimeout;
-
ui32 DefaultStateLimit;
TMap<EPDiskState, ui32> StateLimits;
diff --git a/ydb/core/cms/sentinel.cpp b/ydb/core/cms/sentinel.cpp
index e265df65f81..ec533b97852 100644
--- a/ydb/core/cms/sentinel.cpp
+++ b/ydb/core/cms/sentinel.cpp
@@ -1,4 +1,5 @@
#include "cms_impl.h"
+#include "cms_state.h"
#include "sentinel.h"
#include "sentinel_impl.h"
@@ -14,8 +15,6 @@
#include <library/cpp/actors/core/log.h>
#include <util/generic/algorithm.h>
-#include <util/generic/hash_set.h>
-#include <util/generic/map.h>
#include <util/string/builder.h>
#include <util/string/join.h>
@@ -302,27 +301,8 @@ IActor* CreateBSControllerPipe(TCmsStatePtr cmsState) {
/// Actors
-template <typename TDerived>
-class TSentinelChildBase: public TActorBootstrapped<TDerived> {
-public:
- using TBase = TSentinelChildBase<TDerived>;
-
- explicit TSentinelChildBase(const TActorId& parent, TCmsStatePtr cmsState)
- : Parent(parent)
- , CmsState(cmsState)
- , Config(CmsState->Config.SentinelConfig)
- {
- }
-
-protected:
- const TActorId Parent;
- TCmsStatePtr CmsState;
- const TCmsSentinelConfig& Config;
-
-}; // TSentinelChildBase
-
template <typename TEvUpdated, typename TDerived>
-class TUpdaterBase: public TSentinelChildBase<TDerived> {
+class TUpdaterBase: public TActorBootstrapped<TDerived> {
public:
using TBase = TUpdaterBase<TEvUpdated, TDerived>;
@@ -334,8 +314,10 @@ protected:
public:
explicit TUpdaterBase(const TActorId& parent, TCmsStatePtr cmsState, TSentinelState::TPtr sentinelState)
- : TSentinelChildBase<TDerived>(parent, cmsState)
+ : Parent(parent)
+ , CmsState(cmsState)
, SentinelState(sentinelState)
+ , Config(CmsState->Config.SentinelConfig)
{
for (auto& [_, info] : SentinelState->PDisks) {
info->ClearTouched();
@@ -343,7 +325,10 @@ public:
}
protected:
+ const TActorId Parent;
+ TCmsStatePtr CmsState;
TSentinelState::TPtr SentinelState;
+ const TCmsSentinelConfig& Config;
}; // TUpdaterBase
@@ -370,14 +355,11 @@ class TConfigUpdater: public TUpdaterBase<TEvSentinel::TEvConfigUpdated, TConfig
}
void OnRetry(TEvents::TEvWakeup::TPtr& ev) {
- const auto* msg = ev->Get();
- switch (static_cast<RetryCookie>(msg->Tag)) {
+ switch (static_cast<RetryCookie>(ev->Get()->Tag)) {
case RetryCookie::BSC:
- RequestBSConfig();
- break;
+ return RequestBSConfig();
case RetryCookie::CMS:
- RequestCMSClusterState();
- break;
+ return RequestCMSClusterState();
default:
Y_FAIL("Unexpected case");
}
diff --git a/ydb/core/cms/sentinel.h b/ydb/core/cms/sentinel.h
index 8aeac3cc534..f0d1249348f 100644
--- a/ydb/core/cms/sentinel.h
+++ b/ydb/core/cms/sentinel.h
@@ -2,7 +2,6 @@
#include "defs.h"
#include "cms_state.h"
-#include "pdiskid.h"
namespace NKikimr::NCms {
diff --git a/ydb/core/cms/sentinel_impl.h b/ydb/core/cms/sentinel_impl.h
index cf246f9564f..8ed385184db 100644
--- a/ydb/core/cms/sentinel_impl.h
+++ b/ydb/core/cms/sentinel_impl.h
@@ -1,7 +1,6 @@
#pragma once
#include "defs.h"
-#include "cms_state.h"
#include "pdiskid.h"
#include "pdisk_state.h"