mapleFU commented on code in PR #1287:
URL:
https://github.com/apache/incubator-kvrocks/pull/1287#discussion_r1121031191
##########
src/commands/cmd_txn.cc:
##########
@@ -68,13 +69,16 @@ class CommandExec : public Commander {
return Status::OK();
}
+ auto storage = svr->storage_;
// Reply multi length first
conn->Reply(Redis::MultiLen(conn->GetMultiExecCommands()->size()));
// Execute multi-exec commands
conn->SetInExec();
+ storage->BeginTxn();
conn->ExecuteCommands(conn->GetMultiExecCommands());
+ auto s = storage->CommitTxn();
Review Comment:
By the way, do we have a flag to check that `ExecuteCommands` triggers
error. If it has 5 commands, and the 4th command error. Here it will still try
to commit. Am I right?
--
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]