Skip to content

Commit

Permalink
enable making forward decls for component events used by schemeshard
Browse files Browse the repository at this point in the history
That requre changing event definition scopes from `struct` to `namespace`.
  • Loading branch information
ijon committed Oct 21, 2024
1 parent ff01ea7 commit 4b688f3
Show file tree
Hide file tree
Showing 15 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions ydb/core/base/hive.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <util/stream/str.h>

namespace NKikimr {
struct TEvHive {
namespace TEvHive {
enum EEv {
// requests
EvBootTablet = EventSpaceBegin(TKikimrEvents::ES_HIVE),
Expand Down Expand Up @@ -881,7 +881,7 @@ namespace NKikimr {

struct TEvRequestScaleRecommendation : TEventPB<TEvRequestScaleRecommendation,
NKikimrHive::TEvRequestScaleRecommendation, EvRequestScaleRecommendation> {};

struct TEvResponseScaleRecommendation : TEventPB<TEvResponseScaleRecommendation,
NKikimrHive::TEvResponseScaleRecommendation, EvResponseScaleRecommendation> {};
};
Expand Down
2 changes: 1 addition & 1 deletion ydb/core/blob_depot/events.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace NKikimr {

struct TEvBlobDepot {
namespace TEvBlobDepot {
enum {
EvApplyConfig = EventSpaceBegin(TKikimrEvents::ES_BLOB_DEPOT),
EvApplyConfigResult,
Expand Down
2 changes: 1 addition & 1 deletion ydb/core/blockstore/core/blockstore.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace NKikimr {

struct TEvBlockStore {
namespace TEvBlockStore {
enum EEv {
EvBegin = EventSpaceBegin(TKikimrEvents::ES_BLOCKSTORE) + 1011,

Expand Down
2 changes: 1 addition & 1 deletion ydb/core/cms/console/configs_dispatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion ydb/core/cms/console/console.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace NKikimr::NConsole {

struct TEvConsole {
namespace TEvConsole {
enum EEv {
// requests
EvCreateTenantRequest = EventSpaceBegin(TKikimrEvents::ES_CONSOLE),
Expand Down
2 changes: 1 addition & 1 deletion ydb/core/filestore/core/filestore.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace NKikimr {

struct TEvFileStore {
namespace TEvFileStore {
enum EEv {
EvBegin = EventSpaceBegin(TKikimrEvents::ES_FILESTORE),

Expand Down
10 changes: 5 additions & 5 deletions ydb/core/kesus/tablet/events.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace NKesus {
TString CanonizeQuoterResourcePath(const TVector<TString>& path);
TString CanonizeQuoterResourcePath(const TString& path);

struct TEvKesus {
namespace TEvKesus {
enum EEv {
EvBegin = EventSpaceBegin(TKikimrEvents::ES_KESUS),

Expand Down Expand Up @@ -488,15 +488,15 @@ struct TEvKesus {
}
};

struct TEvDeleteQuoterResource : public TEventPB<TEvDeleteQuoterResource, NKikimrKesus::TEvDeleteQuoterResource, EvDeleteQuoterResource> {
struct TEvDeleteQuoterResource : public TEventPB<TEvDeleteQuoterResource, NKikimrKesus::TEvDeleteQuoterResource, EvDeleteQuoterResource> {
using TBaseEvent = TEventPB<TEvDeleteQuoterResource, NKikimrKesus::TEvDeleteQuoterResource, EvDeleteQuoterResource>;
using TBaseEvent::TBaseEvent;
};

struct TEvDeleteQuoterResourceResult : public TEventPB<TEvDeleteQuoterResourceResult, NKikimrKesus::TEvDeleteQuoterResourceResult, EvDeleteQuoterResourceResult> {
using TBaseEvent = TEventPB<TEvDeleteQuoterResourceResult, NKikimrKesus::TEvDeleteQuoterResourceResult, EvDeleteQuoterResourceResult>;
using TBaseEvent::TBaseEvent;
using TBaseEvent::TBaseEvent;

TEvDeleteQuoterResourceResult() = default;

TEvDeleteQuoterResourceResult(Ydb::StatusIds::StatusCode status, const TString& reason) {
Expand Down Expand Up @@ -576,4 +576,4 @@ struct TEvKesus {
};

}
}
}
2 changes: 1 addition & 1 deletion ydb/core/persqueue/events/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ydb/core/tx/columnshard/columnshard.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ inline Ydb::StatusIds::StatusCode ConvertToYdbStatus(NKikimrTxColumnShard::EResu
}
}

struct TEvColumnShard {
namespace TEvColumnShard {
enum EEv {
EvProposeTransaction = EventSpaceBegin(TKikimrEvents::ES_TX_COLUMNSHARD),
EvCancelTransactionProposal,
Expand Down
2 changes: 1 addition & 1 deletion ydb/core/tx/datashard/datashard.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ namespace NTxDataShard {
using NDataShard::TTxFlags;
}

struct TEvDataShard {
namespace TEvDataShard {
enum EEv {
EvProposeTransaction = EventSpaceBegin(TKikimrEvents::ES_TX_DATASHARD),
EvCancelTransactionProposal,
Expand Down
4 changes: 2 additions & 2 deletions ydb/core/tx/replication/controller/public_events.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace NKikimr::NReplication {

struct TEvController {
namespace TEvController {
enum EEv {
EvCreateReplication = EventSpaceBegin(TKikimrEvents::ES_REPLICATION_CONTROLLER),
EvCreateReplicationResult,
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ydb/core/tx/schemeshard/schemeshard.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class ISSDataProcessor {
}
};

struct TEvSchemeShard {
namespace TEvSchemeShard {
enum EEv {
EvModifySchemeTransaction = EventSpaceBegin(TKikimrEvents::ES_FLAT_TX_SCHEMESHARD), // 271122432
EvModifySchemeTransactionResult = EvModifySchemeTransaction + 1 * 512,
Expand Down
2 changes: 1 addition & 1 deletion ydb/core/tx/schemeshard/schemeshard_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace NKikimr {
namespace NSchemeShard {

struct TEvPrivate {
namespace TEvPrivate {
enum EEv {
EvProgressOperation = EventSpaceBegin(TKikimrEvents::ES_PRIVATE),
EvOperationPlanStep,
Expand Down
2 changes: 1 addition & 1 deletion ydb/core/tx/sequenceshard/public/events.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
namespace NKikimr {
namespace NSequenceShard {

struct TEvSequenceShard {
namespace TEvSequenceShard {
enum EEv {
EvMarkSchemeShardPipe = EventSpaceBegin(TKikimrEvents::ES_SEQUENCESHARD),
EvCreateSequence,
Expand Down
2 changes: 1 addition & 1 deletion ydb/core/tx/tx.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ struct TTestTxConfig {
static constexpr ui64 UseLessId = 0xFFFFFFFFFFFFFFF;
};

struct TEvSubDomain {
namespace TEvSubDomain {
enum EEv {
EvConfigure = EventSpaceBegin(TKikimrEvents::ES_SUB_DOMAIN),
EvConfigureStatus,
Expand Down

0 comments on commit 4b688f3

Please sign in to comment.