git-hulk commented on code in PR #1287:
URL: 
https://github.com/apache/incubator-kvrocks/pull/1287#discussion_r1121024526


##########
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:
   Kvrocks won't throw any exception itself, but if the underlying components 
do, then Kvrocks should exit without committing if we didn't catch it. Thats to 
say, for the current implementation, all write operations are grouped into one 
WriteBatch, so it will be committed all or none.



-- 
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]

Reply via email to