merlimat commented on code in PR #4909:
URL: https://github.com/apache/bookkeeper/pull/4909#discussion_r4288679956


##########
bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/storage/ldb/KeyValueStorageRocksDBTest.java:
##########
@@ -97,6 +99,47 @@ public void 
testCompatibleSstFormatWithAndWithoutConfigurationFiles() throws Exc
         }
     }
 
+    @Test
+    public void testEntryLocationPartitionedIndexAndFilters() throws Exception 
{
+        File directory = temporaryFolder.newFolder();
+        ServerConfiguration configuration = new ServerConfiguration();
+        configuration.setEntryLocationRocksdbConf(new File(directory, 
"entry.conf").toString());
+        assertEntryLocationSstLayout(configuration, true);
+
+        
configuration.setProperty("dbStorage_rocksDB_partitionedIndexAndFiltersEnabled",
 false);
+        assertEntryLocationSstLayout(configuration, false);
+
+        configuration = new ServerConfiguration();
+        configuration.setEntryLocationRocksdbConf(
+                
getClass().getClassLoader().getResource("conf/entry_location_rocksdb.conf").getPath());
+        assertEntryLocationSstLayout(configuration, true);
+    }
+
+    private void assertEntryLocationSstLayout(ServerConfiguration 
configuration, boolean partitioned)
+            throws Exception {
+        File directory = temporaryFolder.newFolder();
+        try (KeyValueStorageRocksDB storage = new KeyValueStorageRocksDB(
+                directory.toString(), "db", 
KeyValueStorageFactory.DbConfigType.EntryLocation, configuration)) {
+            storage.put(new byte[]{1}, new byte[]{2});

Review Comment:
   Done in a6b6b4bd20: the test now writes 10 ledgers × 1000 entries and 
compacts them. With 256-byte data blocks the SST has 6 index partitions; the 
12.4 KB filter spans about 4 partitions of 4 KiB. It then reads back every 
entry, entries that are absent, and each ledger's last entry via `getFloor`. 
All three cases are covered: default config, partitioning disabled, and the 
options file.
   
   _🤖 Addressed by [Claude Code](https://claude.com/claude-code)_



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