Skip to content

Commit

Permalink
Reduce binary size (AuditLogEntry) (#6624)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximyurchuk authored Jul 12, 2024
1 parent 6186f0c commit 1a6514b
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions ydb/core/ymq/actor/action.h
Original file line number Diff line number Diff line change
Expand Up @@ -362,12 +362,9 @@ class TActionActor
#undef RESPONSE_CASE
}
}

template <class TResponse>
void AuditLogEntry(const TResponse& response, const TString& requestId, const TError* error = nullptr) {
if (!error && response.HasError()) {
error = &response.GetError();
}

private:
void AuditLogEntryImpl(const TString& requestId, const TError* error = nullptr) {
static const TString EmptyValue = "{none}";
AUDIT_LOG(
AUDIT_PART("component", TString("ymq"))
Expand All @@ -385,6 +382,15 @@ class TActionActor
);
}

protected:
template <class TResponse>
void AuditLogEntry(const TResponse& response, const TString& requestId, const TError* error = nullptr) {
if (!error && response.HasError()) {
error = &response.GetError();
}
AuditLogEntryImpl(requestId, error);
}

void PassAway() {
if (TProxyActor::NeedCreateProxyActor(Action_)) {
if (TString queueName = GetQueueName()) {
Expand Down

0 comments on commit 1a6514b

Please sign in to comment.