nagisa-kunhah commented on code in PR #3481:
URL: https://github.com/apache/kvrocks/pull/3481#discussion_r3271347827


##########
src/types/cuckoo_filter_page.h:
##########
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+#pragma once
+
+#include <rocksdb/status.h>
+#include <rocksdb/write_batch.h>
+
+#include <cstdint>
+#include <string>
+#include <unordered_map>
+#include <vector>
+
+#include "storage/redis_metadata.h"
+#include "storage/storage.h"
+
+namespace redis {
+
+class CuckooPageSet {

Review Comment:
   I addressed this by narrowing the abstraction instead of keeping the old 
`CuckooPageSet` naming. 
   
   There are two changes here:
   
   1. Renamed `CuckooPageSet` to `CuckooPageCache`, since this class is really 
a per-operation page cache for cuckoofilter pages, not a set-like container.
   
   2. Moved the candidate-bucket insertion policy out of the page cache 
boundary. The page cache now only owns page/bucket access concerns, such as 
loading/prefetching pages, reading/writing bucket slots, and writing dirty 
pages back. The sub-filter layer owns the insertion policy, including the order 
of trying the primary and secondary buckets.



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