diff options
author | Innokentii Mokin <innokentii@ydb.tech> | 2024-10-08 17:01:04 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-08 17:01:04 +0300 |
commit | 887fe7f5203987fcd385d22be4adb23e8343049a (patch) | |
tree | 61618da70b006a44be85f7eeef1fa8b255132b49 | |
parent | b8ac272073331b981a525ff15a5ed150e6c24f31 (diff) | |
download | ydb-887fe7f5203987fcd385d22be4adb23e8343049a.tar.gz |
Simplify TSubOperation (#10211)
-rw-r--r-- | ydb/core/tx/schemeshard/schemeshard__operation_part.cpp | 2 | ||||
-rw-r--r-- | ydb/core/tx/schemeshard/schemeshard__operation_part.h | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_part.cpp b/ydb/core/tx/schemeshard/schemeshard__operation_part.cpp index 3b1c0ff832..12300b20d6 100644 --- a/ydb/core/tx/schemeshard/schemeshard__operation_part.cpp +++ b/ydb/core/tx/schemeshard/schemeshard__operation_part.cpp @@ -89,7 +89,7 @@ static TString LogMessage(const TString& ev, TOperationContext& context, bool ig } \ \ bool TSubOperation::HandleReply(TEvType::TPtr& ev, TOperationContext& context) { \ - return Progress(context, &ISubOperationState::HandleReply, ev, context); \ + return Progress(context, &ISubOperationState::HandleReply, ev); \ } SCHEMESHARD_INCOMING_EVENTS(DefaultHandleReply) diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_part.h b/ydb/core/tx/schemeshard/schemeshard__operation_part.h index 3498ea86c6..f3ecb60d52 100644 --- a/ydb/core/tx/schemeshard/schemeshard__operation_part.h +++ b/ydb/core/tx/schemeshard/schemeshard__operation_part.h @@ -278,7 +278,7 @@ public: } bool ProgressState(TOperationContext& context) override { - return Progress(context, &ISubOperationState::ProgressState, context); + return Progress(context, &ISubOperationState::ProgressState); } #define DefaultHandleReply(TEvType, ...) \ @@ -292,9 +292,9 @@ private: using TFunc = bool(ISubOperationState::*)(Args...); template <typename... Args> - bool Progress(TOperationContext& context, TFunc<Args...> func, Args&&... args) { + bool Progress(TOperationContext& context, TFunc<Args..., TOperationContext&> func, Args&&... args) { Y_ABORT_UNLESS(StateFunc); - const bool isDone = std::invoke(func, StateFunc.Get(), std::forward<Args>(args)...); + const bool isDone = std::invoke(func, StateFunc.Get(), std::forward<Args>(args)..., context); if (isDone) { StateDone(context); } |