yozaner1324 commented on code in PR #7582: URL: https://github.com/apache/geode/pull/7582#discussion_r849968202
########## geode-core/src/main/java/org/apache/geode/internal/process/ControlFileWatchdog.java: ########## @@ -175,6 +185,21 @@ private String createThreadName() { * Defines the callback to be invoked when the control file exists. */ interface ControlRequestHandler { + /** + * This is the form that is called from {@link ControlFileWatchdog#handleRequest(FileReader)}. + * Not all implementations require the {@link FileReader}, so they may continue implementing the + * no-args form which is called from this method by default. + * + * @param fileReader a {@link FileReader} to read the status file. + */ + default void handleRequest(FileReader fileReader) throws IOException { Review Comment: So, the bug comes from trying to read the file while it's open in another process throws an exception on Windows, so instead of just checking if the file exists, I create a FileReader on the outside to verify that the file is accessible and then pass the FileReader down to keep the file open until handleRequest is done with it. That being said, I think I just found a way to do this without having to pass the FileReader all the way down, which won't require this added method and will be cleaner. -- 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: notifications-unsubscr...@geode.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org