git-hulk commented on code in PR #1870:
URL: https://github.com/apache/kvrocks/pull/1870#discussion_r1385872369
##########
src/types/redis_stream.cc:
##########
@@ -232,6 +241,34 @@ std::string
Stream::encodeStreamConsumerMetadataValue(const StreamConsumerMetada
return dst;
}
+StreamConsumerMetadata Stream::decodeStreamConsumerMetadataValue(const
std::string &value) {
+ StreamConsumerMetadata consumer_metadata;
+ rocksdb::Slice input(value);
+ GetFixed64(&input, &consumer_metadata.pending_number);
+ GetFixed64(&input, &consumer_metadata.last_idle);
+ GetFixed64(&input, &consumer_metadata.last_active);
+ return consumer_metadata;
+}
+
+StreamSubkeyType Stream::identifySubkeyType(const rocksdb::Slice &key) {
+ InternalKey ikey(key, storage_->IsSlotIdEncoded());
+ Slice subkey = ikey.GetSubKey();
+ if (subkey.size() <= 16) { // id.ms(uint64) + id.seq(uint64)
Review Comment:
Hi @Yangsx-1, can you resolve this comment?
--
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]