muralibasani commented on code in PR #21751:
URL: https://github.com/apache/kafka/pull/21751#discussion_r2933428903
##########
streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBTimestampedStore.java:
##########
@@ -63,23 +63,33 @@ void openRocksDB(final DBOptions dbOptions,
final ColumnFamilyHandle withTimestampColumnFamily =
columnFamilies.get(1);
final ColumnFamilyHandle offsetsColumnFamily = columnFamilies.get(2);
- final RocksIterator noTimestampsIter =
db.newIterator(noTimestampColumnFamily);
- noTimestampsIter.seekToFirst();
- if (noTimestampsIter.isValid()) {
- log.info("Opening store {} in upgrade mode", name);
- cfAccessor = new DualColumnFamilyAccessor(
- offsetsColumnFamily,
- noTimestampColumnFamily,
- withTimestampColumnFamily,
- TimestampedBytesStore::convertToTimestampedFormat,
- this, open
- );
- } else {
- log.info("Opening store {} in regular mode", name);
- cfAccessor = new SingleColumnFamilyAccessor(offsetsColumnFamily,
withTimestampColumnFamily);
- noTimestampColumnFamily.close();
+ boolean success = false;
+ try {
+ try (final RocksIterator noTimestampsIter =
db.newIterator(noTimestampColumnFamily)) {
Review Comment:
updating with try-resources
--
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]