You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "enjoy-binbin (via GitHub)" <gi...@apache.org> on 2023/07/18 09:26:32 UTC
[GitHub] [kvrocks] enjoy-binbin opened a new pull request, #1596: Use LMOVE logic to handle RPOPLPUSH
enjoy-binbin opened a new pull request, #1596:
URL: https://github.com/apache/kvrocks/pull/1596
RPOPLPUSH is actually LMOVE RIGHT LEFT, we can use
list_db.LMove to replace List::RPopLPush. In this way
we can enjoy the multi locks guard and operate multi
keys atomically.
--
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kvrocks] mapleFU commented on a diff in pull request #1596: Use LMOVE logic to handle RPOPLPUSH
Posted by "mapleFU (via GitHub)" <gi...@apache.org>.
mapleFU commented on code in PR #1596:
URL: https://github.com/apache/kvrocks/pull/1596#discussion_r1266508388
##########
src/commands/cmd_list.cc:
##########
@@ -508,7 +508,7 @@ class CommandRPopLPUSH : public Commander {
Status Execute(Server *svr, Connection *conn, std::string *output) override {
redis::List list_db(svr->storage, conn->GetNamespace());
std::string elem;
- auto s = list_db.RPopLPush(args_[1], args_[2], &elem);
+ auto s = list_db.LMove(args_[1], args_[2], false, true, &elem);
Review Comment:
```suggestion
auto s = list_db.LMove(args_[1], args_[2], /*src_left=*/false, /*dst_left=*/true, &elem);
```
--
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kvrocks] git-hulk merged pull request #1596: Use LMOVE logic to handle RPOPLPUSH
Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk merged PR #1596:
URL: https://github.com/apache/kvrocks/pull/1596
--
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org