klion26 commented on a change in pull request #7481: [Flink-11314] Reuse 
RocksDBWriteBatchWrapper in the flush function of…
URL: https://github.com/apache/flink/pull/7481#discussion_r247740467
 
 

 ##########
 File path: 
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBMapState.java
 ##########
 @@ -218,22 +217,20 @@ public UV next() {
        public void clear() {
                try {
                        try (RocksIteratorWrapper iterator = 
RocksDBKeyedStateBackend.getRocksIterator(backend.db, columnFamily);
-                               WriteBatch writeBatch = new WriteBatch(128)) {
+                               RocksDBWriteBatchWrapper 
rocksDBWriteBatchWrapper = new RocksDBWriteBatchWrapper(backend.db, 
backend.getWriteOptions())) {
 
 Review comment:
   As the doc said `RocksDBWriteBatchWrapper` is not thread safe, after 
reusing, will there be a concurrent problem?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to