eduwercamacaro commented on code in PR #21578:
URL: https://github.com/apache/kafka/pull/21578#discussion_r2879776267


##########
streams/src/main/java/org/apache/kafka/streams/state/internals/AbstractColumnFamilyAccessor.java:
##########
@@ -54,8 +60,30 @@ public final void commit(final RocksDBStore.DBAccessor 
accessor, final Map<Topic
     }
 
     @Override
-    public void close() {
+    public void open(final RocksDBStore.DBAccessor accessor) throws 
RocksDBException {
+        final byte[] valueBytes = accessor.get(offsetColumnFamilyHandle, 
statusKey);
+        if (valueBytes == null || Arrays.equals(valueBytes, closedState)) {
+            // If the status key is not present, we initialize it to "OPEN"
+            accessor.put(offsetColumnFamilyHandle, statusKey, openState);
+            // Store the new status on disk
+            accessor.flush(offsetColumnFamilyHandle);

Review Comment:
   Ok, that makes total sense to me. 
   I just wanted to be absolutely certain that the `open` state is always 
maintained on disk. But, as you said, that's not necessary. 
   
   



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