ivanzlenko commented on code in PR #6903:
URL: https://github.com/apache/ignite-3/pull/6903#discussion_r2494208916
##########
modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/server/raft/MetaStorageWriteHandler.java:
##########
@@ -123,7 +125,20 @@ void handleWriteCommand(CommandClosure<WriteCommand> clo) {
CommandResultAndTimestamp cachedResult =
idempotentCommandCache.get(commandId);
if (cachedResult != null) {
- clo.result(cachedResult.commandResult);
+ Serializable commandResult = cachedResult.commandResult;
+
+ // A command result that is a single boolean must be
serialized separately and wrapped into StatementResult,
+ // because the closure expects a StatementResult.
+ if (commandResult instanceof Boolean && command instanceof
MultiInvokeCommand) {
Review Comment:
The issue only exists for MultiInvokeCommand. InvokeComman could return only
Boolean
##########
modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/server/raft/MetaStorageWriteHandler.java:
##########
@@ -123,7 +125,20 @@ void handleWriteCommand(CommandClosure<WriteCommand> clo) {
CommandResultAndTimestamp cachedResult =
idempotentCommandCache.get(commandId);
if (cachedResult != null) {
- clo.result(cachedResult.commandResult);
+ Serializable commandResult = cachedResult.commandResult;
+
+ // A command result that is a single boolean must be
serialized separately and wrapped into StatementResult,
+ // because the closure expects a StatementResult.
+ if (commandResult instanceof Boolean && command instanceof
MultiInvokeCommand) {
Review Comment:
The issue only exists for MultiInvokeCommand. InvokeCommand could return
only Boolean
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]