Re: [PR] [FLINK-35457][checkpoint] Hotfix! close physical file under the protection of lock [flink]
fredia merged PR #24846: URL: https://github.com/apache/flink/pull/24846 -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [FLINK-35457][checkpoint] Hotfix! close physical file under the protection of lock [flink]
fredia commented on code in PR #24846: URL: https://github.com/apache/flink/pull/24846#discussion_r1616500402 ## flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/filemerging/FileMergingSnapshotManagerBase.java: ## @@ -131,19 +131,22 @@ public abstract class FileMergingSnapshotManagerBase implements FileMergingSnaps /** * The {@link DirectoryStreamStateHandle} for shared state directories, one for each subtask. */ +@GuardedBy("lock") Review Comment: Thanks for the suggestion, removed `@GuardedBy("lock")`. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [FLINK-35457][checkpoint] Hotfix! close physical file under the protection of lock [flink]
Zakelly commented on code in PR #24846: URL: https://github.com/apache/flink/pull/24846#discussion_r1615993191 ## flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/filemerging/FileMergingSnapshotManagerBase.java: ## @@ -131,19 +131,22 @@ public abstract class FileMergingSnapshotManagerBase implements FileMergingSnaps /** * The {@link DirectoryStreamStateHandle} for shared state directories, one for each subtask. */ +@GuardedBy("lock") Review Comment: Or adding @GuardedBy("lock") to each of those above variables would be fine with me. ## flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/filemerging/FileMergingSnapshotManagerBase.java: ## @@ -131,19 +131,22 @@ public abstract class FileMergingSnapshotManagerBase implements FileMergingSnaps /** * The {@link DirectoryStreamStateHandle} for shared state directories, one for each subtask. */ +@GuardedBy("lock") Review Comment: Or adding `@GuardedBy("lock")` to each of those above variables would be fine with me. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [FLINK-35457][checkpoint] Hotfix! close physical file under the protection of lock [flink]
Zakelly commented on code in PR #24846: URL: https://github.com/apache/flink/pull/24846#discussion_r1615989878 ## flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/filemerging/FileMergingSnapshotManagerBase.java: ## @@ -131,19 +131,22 @@ public abstract class FileMergingSnapshotManagerBase implements FileMergingSnaps /** * The {@link DirectoryStreamStateHandle} for shared state directories, one for each subtask. */ +@GuardedBy("lock") Review Comment: Well, the `fileSystemInitiated`, `checkpointDir`, `sharedStateDir ` and `taskOwnedStateDir` would also be `@GuardedBy("lock")`. I'd suggest removing this since this is controlling one-time initialization, not a typical concurrent modification scenario. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [FLINK-35457][checkpoint] Hotfix! close physical file under the protection of lock [flink]
fredia commented on code in PR #24846: URL: https://github.com/apache/flink/pull/24846#discussion_r1615819086 ## flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/filemerging/FileMergingSnapshotManagerBase.java: ## @@ -131,19 +131,22 @@ public abstract class FileMergingSnapshotManagerBase implements FileMergingSnaps /** * The {@link DirectoryStreamStateHandle} for shared state directories, one for each subtask. */ +@GuardedBy("lock") Review Comment: Removed the `@GuardedBy("lock")`, cause the map is `ConcurrentHashMap`, which is thread-safe. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [FLINK-35457][checkpoint] Hotfix! close physical file under the protection of lock [flink]
Zakelly commented on code in PR #24846: URL: https://github.com/apache/flink/pull/24846#discussion_r1615750150 ## flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/filemerging/FileMergingSnapshotManagerBase.java: ## @@ -131,19 +131,22 @@ public abstract class FileMergingSnapshotManagerBase implements FileMergingSnaps /** * The {@link DirectoryStreamStateHandle} for shared state directories, one for each subtask. */ +@GuardedBy("lock") Review Comment: If this map is guarded by `lock`, the methods `registerSubtaskForSharedStates` and `unregisterSubtask` should also be protected by `lock` -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [FLINK-35457][checkpoint] Hotfix! close physical file under the protection of lock [flink]
flinkbot commented on PR #24846: URL: https://github.com/apache/flink/pull/24846#issuecomment-2132573107 ## CI report: * 411168066e0918d38167fc9e33861fc1945baa27 UNKNOWN Bot commands The @flinkbot bot supports the following commands: - `@flinkbot run azure` re-run the last Azure build -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] [FLINK-35457][checkpoint] Hotfix! close physical file under the protection of lock [flink]
fredia opened a new pull request, #24846: URL: https://github.com/apache/flink/pull/24846 ## What is the purpose of the change *(For example: This pull request makes task deployment go through the blob server, rather than through RPC. That way we avoid re-transferring them on each deployment (during recovery).)* ## Brief change log The `PhysicalFile#outputStream` may be closed by both `innerClose` and `deleteIfNecessary`, we need to ensure that it is only closed once. ## Verifying this change This change is a trivial rework / code cleanup without any test coverage. ## Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): (no) - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no) - The serializers: (no) - The runtime per-record code paths (performance sensitive): (no) - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no) - The S3 file system connector: (no) ## Documentation - Does this pull request introduce a new feature? (no) - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented) -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org