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/08/25 08:28:38 UTC
[GitHub] [kvrocks] enjoy-binbin commented on a diff in pull request #1700: Use MultiLockGuard to guarantee atomicity for multiple keys commands
enjoy-binbin commented on code in PR #1700:
URL: https://github.com/apache/kvrocks/pull/1700#discussion_r1305358305
##########
src/types/redis_set.cc:
##########
@@ -272,6 +272,15 @@ rocksdb::Status Set::Scan(const Slice &user_key, const std::string &cursor, uint
* DIFF key1 key2 key3 = {b,d}
*/
rocksdb::Status Set::Diff(const std::vector<Slice> &keys, std::vector<std::string> *members) {
+ std::string ns_key;
+ std::vector<std::string> lock_keys;
+ lock_keys.reserve(keys.size());
+ for (const auto key : keys) {
+ ns_key = AppendNamespacePrefix(key);
+ lock_keys.emplace_back(ns_key);
Review Comment:
thanks, updated.
--
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