You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "StefanRRichter (via GitHub)" <gi...@apache.org> on 2023/06/13 14:47:08 UTC

[GitHub] [flink] StefanRRichter commented on a diff in pull request #22771: [FLINK-32326][state] Disable WAL in RocksDBWriteBatchWrapper by default.

StefanRRichter commented on code in PR #22771:
URL: https://github.com/apache/flink/pull/22771#discussion_r1228254143


##########
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBWriteBatchWrapper.java:
##########
@@ -125,10 +130,16 @@ public WriteOptions getOptions() {
 
     @Override
     public void close() throws RocksDBException {
-        if (batch.count() != 0) {
-            flush();
+        try {
+            if (batch.count() != 0) {
+                flush();
+            }
+        } finally {
+            IOUtils.closeQuietly(batch);
+            if (ownsWriteOptions) {
+                IOUtils.closeQuietly(options);
+            }

Review Comment:
   Sorry if it's a stupid question, but what is "closer"? Like closable registry?



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org