xq2010 commented on code in PR #1798:
URL: https://github.com/apache/kvrocks/pull/1798#discussion_r1356037586
##########
src/storage/rdb.cc:
##########
@@ -356,17 +378,28 @@ StatusOr<std::vector<MemberScore>>
RDB::LoadZSetWithZipList() {
return zset;
}
-Status RDB::Restore(const std::string &key, uint64_t ttl_ms) {
+Status RDB::Restore(const std::string &key, std::string_view payload, uint64_t
ttl_ms) {
rocksdb::Status db_status;
// Check the checksum of the payload
- GET_OR_RET(VerifyPayloadChecksum());
+ GET_OR_RET(VerifyPayloadChecksum(payload));
auto type = GET_OR_RET(LoadObjectType());
+
+ auto value = GET_OR_RET(loadRdbObject(type, key));
+
+ return saveRdbObject(type, key, value, ttl_ms); // NOLINT
Review Comment:
The lint report falsely indicates a memory leak, but I can't find any
potential for a memory leak
--
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]