Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove TEventSimple #6715

Merged
merged 4 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ydb/core/protos/tx_proxy.proto
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ message TEvInvalidateTable {
optional uint64 TableId = 2;
}

message TEvInvalidateTableResult {
}

message TEvExportRequest {
optional string DatabaseName = 1;
optional string UserToken = 2;
Expand Down
6 changes: 3 additions & 3 deletions ydb/core/tx/tx_proxy/datareq.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ class TDataReq : public TActor<TDataReq> {

static_assert(EvEnd < EventSpaceEnd(TEvents::ES_PRIVATE), "expect EvEnd < EventSpaceEnd(TEvents::ES_PRIVATE)");

struct TEvProxyDataReqOngoingTransactionWatchdog : public TEventSimple<TEvProxyDataReqOngoingTransactionWatchdog, EvProxyDataReqOngoingTransactionsWatchdog> {};
struct TEvProxyDataReqOngoingTransactionsWatchdog : public TEventLocal<TEvProxyDataReqOngoingTransactionsWatchdog, EvProxyDataReqOngoingTransactionsWatchdog> {};

struct TEvReattachToShard : public TEventLocal<TEvReattachToShard, EvReattachToShard> {
const ui64 TabletId;
Expand Down Expand Up @@ -1306,7 +1306,7 @@ void TDataReq::Handle(TEvTxProxyReq::TEvMakeRequest::TPtr &ev, const TActorConte
}

WallClockAccepted = Now();
ctx.Schedule(TDuration::MilliSeconds(KIKIMR_DATAREQ_WATCHDOG_PERIOD), new TEvPrivate::TEvProxyDataReqOngoingTransactionWatchdog());
ctx.Schedule(TDuration::MilliSeconds(KIKIMR_DATAREQ_WATCHDOG_PERIOD), new TEvPrivate::TEvProxyDataReqOngoingTransactionsWatchdog());

// Schedule execution timeout
{
Expand Down Expand Up @@ -2942,7 +2942,7 @@ void TDataReq::HandleWatchdog(const TActorContext &ctx) {
LOG_LOG_S_SAMPLED_BY(ctx, NActors::NLog::PRI_INFO, NKikimrServices::TX_PROXY, TxId,
"Actor# " << ctx.SelfID.ToString() << " txid# " << TxId
<< " Transactions still running for " << fromStart);
ctx.Schedule(TDuration::MilliSeconds(KIKIMR_DATAREQ_WATCHDOG_PERIOD), new TEvPrivate::TEvProxyDataReqOngoingTransactionWatchdog());
ctx.Schedule(TDuration::MilliSeconds(KIKIMR_DATAREQ_WATCHDOG_PERIOD), new TEvPrivate::TEvProxyDataReqOngoingTransactionsWatchdog());
}

void TDataReq::SendStreamClearanceResponse(ui64 shard, bool cleared, const TActorContext &ctx)
Expand Down
2 changes: 1 addition & 1 deletion ydb/core/tx/tx_proxy/proxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ struct TEvTxUserProxy {
}
};

struct TEvInvalidateTableResult : public TEventSimple<TEvInvalidateTableResult, EvInvalidateTableResult> {};
struct TEvInvalidateTableResult : public TEventPB<TEvInvalidateTableResult, NKikimrTxUserProxy::TEvInvalidateTableResult, EvInvalidateTableResult> {};

struct TEvProposeKqpTransaction : public TEventLocal<TEvProposeKqpTransaction, EvProposeKqpTransaction> {
TActorId ExecuterId;
Expand Down
25 changes: 0 additions & 25 deletions ydb/library/actors/core/event_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,29 +46,4 @@ namespace NActors {
}
};

template <typename TEv, ui32 TEventType>
class TEventSimple: public TEventBase<TEv, TEventType> {
public:
TString ToStringHeader() const override {
static TString header(TypeName<TEv>());
return header;
}

bool SerializeToArcadiaStream(TChunkSerializer* /*serializer*/) const override {
static_assert(sizeof(TEv) == sizeof(TEventSimple<TEv, TEventType>), "Descendant should be an empty class");
return true;
}

bool IsSerializable() const override {
return true;
}

static IEventBase* Load(NActors::TEventSerializedData*) {
return new TEv();
}

static IEventBase* Load(const TString&) {
return new TEv();
}
};
}
Loading