AntiTopQuark commented on code in PR #2508:
URL: https://github.com/apache/kvrocks/pull/2508#discussion_r1737632682


##########
src/types/redis_stream.cc:
##########
@@ -1619,11 +1672,12 @@ uint64_t Stream::trim(engine::Context &ctx, const 
std::string &ns_key, const Str
     metadata->recorded_first_entry_id.Clear();
   }
 
-  if (ret > 0) {
+  if (delete_cnt > 0) {
     metadata->max_deleted_entry_id = entryIDFromInternalKey(last_deleted);
   }
 
-  return ret;
+  return rocksdb::Status::OK();
+  ;

Review Comment:
   I tried it and I can't use `StatusOr<T>` as the return value because 
`rocksdb::Status` and `Status` are different and `rocksdb::Status` lacks 
methods like `GetValue()`.



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