git-hulk commented on code in PR #1287:
URL:
https://github.com/apache/incubator-kvrocks/pull/1287#discussion_r1121034044
##########
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:
Yes, that's right. Redis also don't check the execute command status, for
example:
```
❯ redis-cli
127.0.0.1:6379> MULTI
OK
127.0.0.1:6379(TX)> SET k1 v1
QUEUED
127.0.0.1:6379(TX)> hset k1 field value
QUEUED
127.0.0.1:6379(TX)> EXEC
1) OK
2) (error) WRONGTYPE Operation against a key holding the wrong kind of value
```
--
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]