PragmaTwice commented on code in PR #3175:
URL: https://github.com/apache/kvrocks/pull/3175#discussion_r2350483655


##########
src/storage/compact_filter.cc:
##########
@@ -216,9 +217,35 @@ bool SearchFilter::Filter([[maybe_unused]] int level, 
const Slice &key, [[maybe_
   return false;
 }
 
-bool IndexFilter::Filter([[maybe_unused]] int level, [[maybe_unused]] const 
Slice &key,
-                         [[maybe_unused]] const Slice &value, [[maybe_unused]] 
std::string *new_value,
-                         [[maybe_unused]] bool *modified) const {
+bool IndexFilter::Filter([[maybe_unused]] int level, const Slice &key, 
[[maybe_unused]] const Slice &value,
+                         [[maybe_unused]] std::string *new_value, 
[[maybe_unused]] bool *modified) const {
+  auto db = stor_->GetDB();
+
+  // There only `TS_LABEL` index type for now, so we just handle the 
`TS_LABEL` index here.
+  // If add more index types in the future, need to distinguish them.
+  auto rev_key = redis::TSRevLabelKey(key);

Review Comment:
   I think currently we also need to check if it is `TS_LABEL`, and ignore 
non-`TS_LABEL` keys (as an early return).



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