From 77bdc689c626610e3a6d70484025408ebef1a122 Mon Sep 17 00:00:00 2001 From: Ivan Chelyubeev Date: Fri, 18 Oct 2024 17:08:18 +0300 Subject: [PATCH] enable making forward decls for component events used by schemeshard That requre changing event definition scopes from `struct` to `namespace`. --- ydb/core/base/hive.h | 4 ++-- ydb/core/blob_depot/events.h | 2 +- ydb/core/blockstore/core/blockstore.h | 2 +- ydb/core/cms/console/configs_dispatcher.h | 2 +- ydb/core/cms/console/console.h | 2 +- ydb/core/filestore/core/filestore.h | 2 +- ydb/core/kesus/tablet/events.h | 10 +++++----- ydb/core/persqueue/events/global.h | 2 +- ydb/core/tx/columnshard/columnshard.h | 2 +- ydb/core/tx/datashard/datashard.h | 2 +- ydb/core/tx/replication/controller/public_events.h | 4 ++-- ydb/core/tx/schemeshard/schemeshard.h | 2 +- ydb/core/tx/schemeshard/schemeshard__operation_part.h | 4 ++-- ydb/core/tx/schemeshard/schemeshard_private.h | 2 +- ydb/core/tx/sequenceshard/public/events.h | 2 +- ydb/core/tx/tx.h | 2 +- 16 files changed, 23 insertions(+), 23 deletions(-) diff --git a/ydb/core/base/hive.h b/ydb/core/base/hive.h index 982d04035499..a4b468f9cd50 100644 --- a/ydb/core/base/hive.h +++ b/ydb/core/base/hive.h @@ -9,7 +9,7 @@ #include namespace NKikimr { - struct TEvHive { + namespace TEvHive { enum EEv { // requests EvBootTablet = EventSpaceBegin(TKikimrEvents::ES_HIVE), @@ -881,7 +881,7 @@ namespace NKikimr { struct TEvRequestScaleRecommendation : TEventPB {}; - + struct TEvResponseScaleRecommendation : TEventPB {}; }; diff --git a/ydb/core/blob_depot/events.h b/ydb/core/blob_depot/events.h index 4e7fe62c7195..aa001274f427 100644 --- a/ydb/core/blob_depot/events.h +++ b/ydb/core/blob_depot/events.h @@ -6,7 +6,7 @@ namespace NKikimr { - struct TEvBlobDepot { + namespace TEvBlobDepot { enum { EvApplyConfig = EventSpaceBegin(TKikimrEvents::ES_BLOB_DEPOT), EvApplyConfigResult, diff --git a/ydb/core/blockstore/core/blockstore.h b/ydb/core/blockstore/core/blockstore.h index 3c2c46c3da08..39b6795ae475 100644 --- a/ydb/core/blockstore/core/blockstore.h +++ b/ydb/core/blockstore/core/blockstore.h @@ -7,7 +7,7 @@ namespace NKikimr { -struct TEvBlockStore { +namespace TEvBlockStore { enum EEv { EvBegin = EventSpaceBegin(TKikimrEvents::ES_BLOCKSTORE) + 1011, diff --git a/ydb/core/cms/console/configs_dispatcher.h b/ydb/core/cms/console/configs_dispatcher.h index 90ec90e07c47..cf60eb1a05f6 100644 --- a/ydb/core/cms/console/configs_dispatcher.h +++ b/ydb/core/cms/console/configs_dispatcher.h @@ -28,7 +28,7 @@ namespace NKikimr::NConsole { * ConfigId filled in and request Cookie used for response). */ -struct TEvConfigsDispatcher { +namespace TEvConfigsDispatcher { enum EEv { EvSetConfigSubscriptionRequest = EventSpaceBegin(TKikimrEvents::ES_CONFIGS_DISPATCHER), EvSetConfigSubscriptionResponse, diff --git a/ydb/core/cms/console/console.h b/ydb/core/cms/console/console.h index 5e4d305fe597..1cfc641a372e 100644 --- a/ydb/core/cms/console/console.h +++ b/ydb/core/cms/console/console.h @@ -12,7 +12,7 @@ namespace NKikimr::NConsole { -struct TEvConsole { +namespace TEvConsole { enum EEv { // requests EvCreateTenantRequest = EventSpaceBegin(TKikimrEvents::ES_CONSOLE), diff --git a/ydb/core/filestore/core/filestore.h b/ydb/core/filestore/core/filestore.h index 1ef9a8071713..901381baf1b2 100644 --- a/ydb/core/filestore/core/filestore.h +++ b/ydb/core/filestore/core/filestore.h @@ -7,7 +7,7 @@ namespace NKikimr { -struct TEvFileStore { +namespace TEvFileStore { enum EEv { EvBegin = EventSpaceBegin(TKikimrEvents::ES_FILESTORE), diff --git a/ydb/core/kesus/tablet/events.h b/ydb/core/kesus/tablet/events.h index ac48774b12f7..8b5b2de40107 100644 --- a/ydb/core/kesus/tablet/events.h +++ b/ydb/core/kesus/tablet/events.h @@ -13,7 +13,7 @@ namespace NKesus { TString CanonizeQuoterResourcePath(const TVector& path); TString CanonizeQuoterResourcePath(const TString& path); -struct TEvKesus { +namespace TEvKesus { enum EEv { EvBegin = EventSpaceBegin(TKikimrEvents::ES_KESUS), @@ -488,15 +488,15 @@ struct TEvKesus { } }; - struct TEvDeleteQuoterResource : public TEventPB { + struct TEvDeleteQuoterResource : public TEventPB { using TBaseEvent = TEventPB; using TBaseEvent::TBaseEvent; }; struct TEvDeleteQuoterResourceResult : public TEventPB { using TBaseEvent = TEventPB; - using TBaseEvent::TBaseEvent; - + using TBaseEvent::TBaseEvent; + TEvDeleteQuoterResourceResult() = default; TEvDeleteQuoterResourceResult(Ydb::StatusIds::StatusCode status, const TString& reason) { @@ -576,4 +576,4 @@ struct TEvKesus { }; } -} \ No newline at end of file +} diff --git a/ydb/core/persqueue/events/global.h b/ydb/core/persqueue/events/global.h index b1331a958db6..639ebc74815a 100644 --- a/ydb/core/persqueue/events/global.h +++ b/ydb/core/persqueue/events/global.h @@ -14,7 +14,7 @@ namespace NKikimr { -struct TEvPersQueue { +namespace TEvPersQueue { enum EEv { EvRequest = EventSpaceBegin(TKikimrEvents::ES_PQ), EvUpdateConfig, //change config for all partitions and count of partitions diff --git a/ydb/core/tx/columnshard/columnshard.h b/ydb/core/tx/columnshard/columnshard.h index 186d665153af..25ae5788054f 100644 --- a/ydb/core/tx/columnshard/columnshard.h +++ b/ydb/core/tx/columnshard/columnshard.h @@ -56,7 +56,7 @@ inline Ydb::StatusIds::StatusCode ConvertToYdbStatus(NKikimrTxColumnShard::EResu } } -struct TEvColumnShard { +namespace TEvColumnShard { enum EEv { EvProposeTransaction = EventSpaceBegin(TKikimrEvents::ES_TX_COLUMNSHARD), EvCancelTransactionProposal, diff --git a/ydb/core/tx/datashard/datashard.h b/ydb/core/tx/datashard/datashard.h index 3d9bc4ee5e07..0cf01a961a13 100644 --- a/ydb/core/tx/datashard/datashard.h +++ b/ydb/core/tx/datashard/datashard.h @@ -192,7 +192,7 @@ namespace NTxDataShard { using NDataShard::TTxFlags; } -struct TEvDataShard { +namespace TEvDataShard { enum EEv { EvProposeTransaction = EventSpaceBegin(TKikimrEvents::ES_TX_DATASHARD), EvCancelTransactionProposal, diff --git a/ydb/core/tx/replication/controller/public_events.h b/ydb/core/tx/replication/controller/public_events.h index dd35a3d60a84..a367e0d50701 100644 --- a/ydb/core/tx/replication/controller/public_events.h +++ b/ydb/core/tx/replication/controller/public_events.h @@ -7,7 +7,7 @@ namespace NKikimr::NReplication { -struct TEvController { +namespace TEvController { enum EEv { EvCreateReplication = EventSpaceBegin(TKikimrEvents::ES_REPLICATION_CONTROLLER), EvCreateReplicationResult, @@ -21,7 +21,7 @@ struct TEvController { EvEnd, }; - static_assert(EvEnd < EventSpaceEnd(TKikimrEvents::ES_REPLICATION_CONTROLLER), + static_assert(EvEnd < EventSpaceEnd(TKikimrEvents::ES_REPLICATION_CONTROLLER), "expect EvEnd < EventSpaceEnd(TKikimrEvents::ES_REPLICATION_CONTROLLER)"); struct TEvCreateReplication diff --git a/ydb/core/tx/schemeshard/schemeshard.h b/ydb/core/tx/schemeshard/schemeshard.h index c8db5b5b3930..ef0cd141107e 100644 --- a/ydb/core/tx/schemeshard/schemeshard.h +++ b/ydb/core/tx/schemeshard/schemeshard.h @@ -51,7 +51,7 @@ class ISSDataProcessor { } }; -struct TEvSchemeShard { +namespace TEvSchemeShard { enum EEv { EvModifySchemeTransaction = EventSpaceBegin(TKikimrEvents::ES_FLAT_TX_SCHEMESHARD), // 271122432 EvModifySchemeTransactionResult = EvModifySchemeTransaction + 1 * 512, diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_part.h b/ydb/core/tx/schemeshard/schemeshard__operation_part.h index 91d6fc1ff21b..ad2dbfba8920 100644 --- a/ydb/core/tx/schemeshard/schemeshard__operation_part.h +++ b/ydb/core/tx/schemeshard/schemeshard__operation_part.h @@ -74,8 +74,8 @@ action(TEvBlobDepot::TEvApplyConfigResult, NSchemeShard::TXTYPE_BLOB_DEPOT_CONFIG_RESULT) \ \ action(TEvPrivate::TEvOperationPlan, NSchemeShard::TXTYPE_PLAN_STEP) \ - action(TEvPrivate::TEvPrivate::TEvCompletePublication, NSchemeShard::TXTYPE_NOTIFY_OPERATION_COMPLETE_PUBLICATION) \ - action(TEvPrivate::TEvPrivate::TEvCompleteBarrier, NSchemeShard::TXTYPE_NOTIFY_OPERATION_COMPLETE_BARRIER) \ + action(TEvPrivate::TEvCompletePublication, NSchemeShard::TXTYPE_NOTIFY_OPERATION_COMPLETE_PUBLICATION) \ + action(TEvPrivate::TEvCompleteBarrier, NSchemeShard::TXTYPE_NOTIFY_OPERATION_COMPLETE_BARRIER) \ \ action(TEvPersQueue::TEvProposeTransactionAttachResult, NSchemeShard::TXTYPE_PERSQUEUE_PROPOSE_ATTACH_RESULT) diff --git a/ydb/core/tx/schemeshard/schemeshard_private.h b/ydb/core/tx/schemeshard/schemeshard_private.h index d4ea68929af9..2ba95e78b0c8 100644 --- a/ydb/core/tx/schemeshard/schemeshard_private.h +++ b/ydb/core/tx/schemeshard/schemeshard_private.h @@ -6,7 +6,7 @@ namespace NKikimr { namespace NSchemeShard { -struct TEvPrivate { +namespace TEvPrivate { enum EEv { EvProgressOperation = EventSpaceBegin(TKikimrEvents::ES_PRIVATE), EvOperationPlanStep, diff --git a/ydb/core/tx/sequenceshard/public/events.h b/ydb/core/tx/sequenceshard/public/events.h index 62187515d291..66f861c8b343 100644 --- a/ydb/core/tx/sequenceshard/public/events.h +++ b/ydb/core/tx/sequenceshard/public/events.h @@ -7,7 +7,7 @@ namespace NKikimr { namespace NSequenceShard { - struct TEvSequenceShard { + namespace TEvSequenceShard { enum EEv { EvMarkSchemeShardPipe = EventSpaceBegin(TKikimrEvents::ES_SEQUENCESHARD), EvCreateSequence, diff --git a/ydb/core/tx/tx.h b/ydb/core/tx/tx.h index 2be95f7bc63b..e5ad9c936d04 100644 --- a/ydb/core/tx/tx.h +++ b/ydb/core/tx/tx.h @@ -240,7 +240,7 @@ struct TTestTxConfig { static constexpr ui64 UseLessId = 0xFFFFFFFFFFFFFFF; }; -struct TEvSubDomain { +namespace TEvSubDomain { enum EEv { EvConfigure = EventSpaceBegin(TKikimrEvents::ES_SUB_DOMAIN), EvConfigureStatus,