aliehsaeedii commented on code in PR #21666:
URL: https://github.com/apache/kafka/pull/21666#discussion_r2904638728


##########
streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBTimestampedStoreWithHeaders.java:
##########
@@ -100,55 +132,43 @@ private void openInUpgradeMode(final DBOptions dbOptions,
             new 
ColumnFamilyDescriptor(TIMESTAMPED_VALUES_WITH_HEADERS_CF_NAME, 
columnFamilyOptions)
         );
 
-        verifyAndCloseEmptyDefaultColumnFamily(columnFamilies.get(0));
+        // verify and close empty Default ColumnFamily
+        try (final RocksIterator defaultIter = 
db.newIterator(columnFamilies.get(0))) {
+            defaultIter.seekToFirst();
+            if (defaultIter.isValid()) {
+                throw new ProcessorStateException(

Review Comment:
   Yes, you are right. Currently, when the exception is thrown, the three 
ColumnFamilyHandle objects from columnFamilies are left open, causing a 
resource leak.
   



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