muralibasani commented on code in PR #21751:
URL: https://github.com/apache/kafka/pull/21751#discussion_r2933437070
##########
streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBTimestampedStoreWithHeaders.java:
##########
@@ -137,51 +147,56 @@ private void openFromTimestampedStore(final DBOptions
dbOptions,
new ColumnFamilyDescriptor(OFFSETS_COLUMN_FAMILY_NAME,
columnFamilyOptions)
);
- // verify and close empty Default ColumnFamily
- try (final RocksIterator defaultIter =
db.newIterator(columnFamilies.get(0))) {
- defaultIter.seekToFirst();
- if (defaultIter.isValid()) {
- // Close all column family handles before throwing
- columnFamilies.get(0).close();
- columnFamilies.get(1).close();
- columnFamilies.get(2).close();
- throw new ProcessorStateException(
- "Inconsistent store state for " + name + ". " +
- "Cannot have both plain (DEFAULT) and timestamped data
simultaneously. " +
- "Headers store can upgrade from either plain or
timestamped format, but not both."
- );
+ boolean success = false;
+ try {
+ // verify and close empty Default ColumnFamily
+ try (final RocksIterator defaultIter =
db.newIterator(columnFamilies.get(0))) {
Review Comment:
updating here as well in the same way 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]