jjz921024 commented on code in PR #2402:
URL: https://github.com/apache/kvrocks/pull/2402#discussion_r1683694236
##########
src/storage/compact_filter.cc:
##########
@@ -131,6 +132,17 @@ bool SubKeyFilter::Filter(int level, const Slice &key,
const Slice &value, std::
return false;
}
+ if (metadata.Type() == kRedisHash) {
+ HashMetadata hash_metadata(false);
+ Slice bytes(cached_metadata_);
+ if (!hash_metadata.Decode(bytes).ok()) {
+ LOG(ERROR) << "[compact_filter/subkey] Failed to get hash_metadata"
+ << ", namespace: " << ikey.GetNamespace() << ", key: " <<
ikey.GetKey() << ", err: " << s.Msg();
+ return false;
+ }
+ return redis::Hash::IsFieldExpired(hash_metadata, value);
+ }
+
return IsMetadataExpired(ikey, metadata) || (metadata.Type() == kRedisBitmap
&& redis::Bitmap::IsEmptySegment(value));
Review Comment:
done
--
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]