ableegoldman commented on a change in pull request #9978: URL: https://github.com/apache/kafka/pull/9978#discussion_r566379864
########## File path: streams/src/main/java/org/apache/kafka/streams/processor/internals/StateDirectory.java ########## @@ -133,6 +152,72 @@ private void configurePermissions(final File file) { } } + /** + * @return true if the state directory was successfully locked + */ + private boolean lockStateDirectory() { + final File lockFile = new File(stateDir, LOCK_FILE_NAME); + try { + stateDirLockChannel = FileChannel.open(lockFile.toPath(), StandardOpenOption.CREATE, StandardOpenOption.WRITE); + stateDirLock = tryLock(stateDirLockChannel); Review comment: Nope, we just hold it until the KafkaStreams is closed ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org