You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/10/25 23:55:46 UTC

[GitHub] [kafka] rodesai opened a new pull request #9498: fix: call super.close when closing rocksdb options

rodesai opened a new pull request #9498:
URL: https://github.com/apache/kafka/pull/9498


   Call super.close when closing rocksdb options. If we don't, then closing a state
   store will leak the underlying rocksdb options object. This is actually somewhat
   costly, since the default options object allocates it's own cache instance.


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

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



[GitHub] [kafka] rodesai commented on a change in pull request #9498: MINOR: call super.close() when closing RocksDB options

Posted by GitBox <gi...@apache.org>.
rodesai commented on a change in pull request #9498:
URL: https://github.com/apache/kafka/pull/9498#discussion_r513100855



##########
File path: streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBGenericOptionsToDbOptionsColumnFamilyOptionsAdapter.java
##########
@@ -1396,5 +1396,6 @@ public void close() {
         // ColumnFamilyOptions should be closed last
         dbOptions.close();
         columnFamilyOptions.close();
+        super.close();

Review comment:
       updated the comment




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

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



[GitHub] [kafka] mjsax commented on a change in pull request #9498: fix: call super.close when closing rocksdb options

Posted by GitBox <gi...@apache.org>.
mjsax commented on a change in pull request #9498:
URL: https://github.com/apache/kafka/pull/9498#discussion_r513093711



##########
File path: streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBGenericOptionsToDbOptionsColumnFamilyOptionsAdapter.java
##########
@@ -1396,5 +1396,6 @@ public void close() {
         // ColumnFamilyOptions should be closed last
         dbOptions.close();
         columnFamilyOptions.close();
+        super.close();

Review comment:
       Are there any ordering constraints to call the three `close` methods?




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

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



[GitHub] [kafka] mjsax merged pull request #9498: MINOR: call super.close() when closing RocksDB options

Posted by GitBox <gi...@apache.org>.
mjsax merged pull request #9498:
URL: https://github.com/apache/kafka/pull/9498


   


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

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



[GitHub] [kafka] rodesai commented on a change in pull request #9498: MINOR: call super.close() when closing RocksDB options

Posted by GitBox <gi...@apache.org>.
rodesai commented on a change in pull request #9498:
URL: https://github.com/apache/kafka/pull/9498#discussion_r513095994



##########
File path: streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBGenericOptionsToDbOptionsColumnFamilyOptionsAdapter.java
##########
@@ -1396,5 +1396,6 @@ public void close() {
         // ColumnFamilyOptions should be closed last
         dbOptions.close();
         columnFamilyOptions.close();
+        super.close();

Review comment:
       I don't think it matters in this case as the parent's Options handle isn't actually used. Still, I've maintained the inverse of the initialization order here.




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

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