PragmaTwice commented on code in PR #3541:
URL: https://github.com/apache/kvrocks/pull/3541#discussion_r3522807927
##########
src/types/redis_string.cc:
##########
@@ -345,7 +347,9 @@ rocksdb::Status String::Set(engine::Context &ctx, const
std::string &user_key, c
metadata.expire = expire;
metadata.Encode(&new_raw_value);
new_raw_value.append(value);
- return updateRawValue(ctx, ns_key, new_raw_value);
+ auto s = updateRawValue(ctx, ns_key, new_raw_value);
+ if (s.ok() && applied != nullptr) *applied = true;
+ return s;
Review Comment:
Why can't we just use the returned status to check? I can't see the value of
`applied`.
##########
src/storage/redis_db.cc:
##########
@@ -158,8 +159,10 @@ rocksdb::Status Database::Del(engine::Context &ctx, const
Slice &user_key) {
return storage_->Delete(ctx, storage_->DefaultWriteOptions(),
metadata_cf_handle_, ns_key);
}
-rocksdb::Status Database::MDel(engine::Context &ctx, const std::vector<Slice>
&keys, uint64_t *deleted_cnt) {
+rocksdb::Status Database::MDel(engine::Context &ctx, const std::vector<Slice>
&keys, uint64_t *deleted_cnt,
+ std::vector<std::string> *deleted_user_keys) {
Review Comment:
I think it's better to use `Slice` or `string_view` instead.
--
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]