git-hulk commented on code in PR #3317:
URL: https://github.com/apache/kvrocks/pull/3317#discussion_r2657148256


##########
src/types/redis_string.cc:
##########
@@ -182,6 +183,52 @@ rocksdb::Status String::GetEx(engine::Context &ctx, const 
std::string &user_key,
   return rocksdb::Status::OK();
 }
 
+rocksdb::Status String::DelEX(engine::Context &ctx, const std::string 
&user_key, const DelExOption &option,
+                              bool &deleted) {
+  deleted = false;
+  std::string ns_key = AppendNamespacePrefix(user_key);

Review Comment:
   @Valay17 Thanks for getting back to me so quickly. 
   
   > My main reason for keeping it this way is that the Exists command checks 
for the key a bit more efficiently. 
   
   `KeyExist` in Kvrocks also uses the `rocksdb::Get` to fetch the key value. 
So maybe we can make this code simple if possible.
   
   > That said, I wasn’t completely sure whether the Delete function already 
handles this internally, as I couldn’t fully confirm it by tracing the parent 
function calls. 
   
   The Delete function only append a delete entry on its WAL, so it won't check 
if a key has been existed or not.



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