muralibasani commented on code in PR #21751:
URL: https://github.com/apache/kafka/pull/21751#discussion_r2933431075
##########
streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBTimestampedStoreWithHeaders.java:
##########
@@ -105,23 +105,33 @@ private void openFromDefaultStore(final DBOptions
dbOptions,
final ColumnFamilyHandle headersCf = columnFamilies.get(1);
final ColumnFamilyHandle offsetsCf = columnFamilies.get(2);
- // Check if default CF has data (plain store upgrade)
- try (final RocksIterator defaultIter = db.newIterator(defaultCf)) {
- defaultIter.seekToFirst();
- if (defaultIter.isValid()) {
- log.info("Opening store {} in upgrade mode from plain key
value store", name);
- cfAccessor = new DualColumnFamilyAccessor(
- offsetsCf,
- defaultCf,
- headersCf,
- HeadersBytesStore::convertFromPlainToHeaderFormat,
- this,
- open
- );
- } else {
- log.info("Opening store {} in regular headers-aware mode",
name);
- cfAccessor = new SingleColumnFamilyAccessor(offsetsCf,
headersCf);
- defaultCf.close();
+ boolean success = false;
+ try {
+ // Check if default CF has data (plain store upgrade)
+ try (final RocksIterator defaultIter = db.newIterator(defaultCf)) {
Review Comment:
also updating with try-with 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]