jihuayu commented on code in PR #2174:
URL: https://github.com/apache/kvrocks/pull/2174#discussion_r1527929151
##########
src/storage/redis_db.h:
##########
@@ -33,12 +33,19 @@ class Database {
public:
static constexpr uint64_t RANDOM_KEY_SCAN_LIMIT = 60;
+ struct GetOptions {
+ // If snapshot is not nullptr, read from the specified snapshot,
+ // otherwise read from the "latest" snapshot.
+ const rocksdb::Snapshot *snapshot = nullptr;
+ };
+
explicit Database(engine::Storage *storage, std::string ns = "");
[[nodiscard]] rocksdb::Status ParseMetadata(RedisTypes types, Slice *bytes,
Metadata *metadata);
- [[nodiscard]] rocksdb::Status GetMetadata(RedisTypes types, const Slice
&ns_key, Metadata *metadata);
- [[nodiscard]] rocksdb::Status GetMetadata(RedisTypes types, const Slice
&ns_key, std::string *raw_value,
- Metadata *metadata, Slice *rest);
- [[nodiscard]] rocksdb::Status GetRawMetadata(const Slice &ns_key,
std::string *bytes);
+ [[nodiscard]] rocksdb::Status GetMetadata(GetOptions options, RedisTypes
types, const Slice &ns_key,
Review Comment:
Thanks, I think it is good enough
--
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]