You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by GitBox <gi...@apache.org> on 2022/06/28 07:37:30 UTC

[GitHub] [incubator-kvrocks] ShooterIT opened a new pull request, #686: Use lock guard for zremrangebylex command

ShooterIT opened a new pull request, #686:
URL: https://github.com/apache/incubator-kvrocks/pull/686

   zremrangebylex command will change the zset data without lock guard,
   this may cause zset data error.


-- 
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] [incubator-kvrocks] ShooterIT merged pull request #686: Use lock guard for zremrangebylex command

Posted by GitBox <gi...@apache.org>.
ShooterIT merged PR #686:
URL: https://github.com/apache/incubator-kvrocks/pull/686


-- 
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] [incubator-kvrocks] caipengbo commented on a diff in pull request #686: Use lock guard for zremrangebylex command

Posted by GitBox <gi...@apache.org>.
caipengbo commented on code in PR #686:
URL: https://github.com/apache/incubator-kvrocks/pull/686#discussion_r908143532


##########
src/redis_zset.cc:
##########
@@ -418,6 +418,11 @@ rocksdb::Status ZSet::RangeByLex(const Slice &user_key,
   std::string ns_key;
   AppendNamespacePrefix(user_key, &ns_key);
 
+  std::unique_ptr<LockGuard> lock_guard;
+  if (spec.removed) {
+    lock_guard = std::unique_ptr<LockGuard>(
+      new LockGuard(storage_->GetLockManager(), dbns_key));

Review Comment:
   ns_key ?



-- 
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] [incubator-kvrocks] caipengbo commented on a diff in pull request #686: Use lock guard for zremrangebylex command

Posted by GitBox <gi...@apache.org>.
caipengbo commented on code in PR #686:
URL: https://github.com/apache/incubator-kvrocks/pull/686#discussion_r908145734


##########
src/redis_zset.cc:
##########
@@ -418,6 +418,11 @@ rocksdb::Status ZSet::RangeByLex(const Slice &user_key,
   std::string ns_key;
   AppendNamespacePrefix(user_key, &ns_key);
 
+  std::unique_ptr<LockGuard> lock_guard;
+  if (spec.removed) {
+    lock_guard = std::unique_ptr<LockGuard>(
+      new LockGuard(storage_->GetLockManager(), dbns_key));

Review Comment:
   ```suggestion
         new LockGuard(storage_->GetLockManager(), ns_key));
   ```



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