cshuo commented on code in PR #18326:
URL: https://github.com/apache/hudi/pull/18326#discussion_r2985320984


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/partitioner/index/RocksDBIndexBackend.java:
##########
@@ -31,9 +35,16 @@ public class RocksDBIndexBackend implements IndexBackend {
 
   private final RocksDBDAO rocksDBDAO;
 
+  private final WriteOptions writeOptions;
+
   public RocksDBIndexBackend(String rocksDbBasePath) {
-    this.rocksDBDAO = new RocksDBDAO("hudi-index-backend", rocksDbBasePath);
+    // Register custom serializer for HoodieRecordGlobalLocation to minimize 
storage overhead
+    ConcurrentHashMap<String, CustomSerializer<?>> serializers = new 
ConcurrentHashMap<>();
+    serializers.put(COLUMN_FAMILY, new RecordGlobalLocationSerializer());
+
+    this.rocksDBDAO = new RocksDBDAO("hudi-index-backend", rocksDbBasePath, 
serializers);
     this.rocksDBDAO.addColumnFamily(COLUMN_FAMILY);
+    this.writeOptions = new WriteOptions().setDisableWAL(true);

Review Comment:
   When creating a RocksDB instance, WAL cannot be disabled globally in 
DB::Open, and it's disabled per write via `WriteOptions `.  Maybe we can wrap 
the write options in RocksDBDAO and support configuring disable WAL at 
RocksDBDAO level.



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