XComp commented on PR #24309: URL: https://github.com/apache/flink/pull/24309#issuecomment-1945921834
I looked into the missing synchronization for the `FineGrainedSlotManager#started` field: AFAIU, we're relying on all the methods which touch `#started` to run in the same thread (which is the `ResourceManager`'s main thread). But as far as I can see, there's nothing documenting this assumption. I'd like improve the code in this regards to make this relationship clearer to code readers as part of FLINK-34427. I see two options: * Make the implementation more robust in a sense that it's requiring certain methods to be executed in the passed (i.e. RM) main thread. * Documenting that the `FineGrainedSlotManager` is not thread-safe and is required to run in a single thread to allow sequential state transitioning in the JavaDoc. In the current version of this PR, I went for the first option. Two test failures popped in the [first CI run](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=57529). `ResourceManagerTest.testDisconnectTaskManager` failed due to the main-thread change. The ActiveResourceManager test failure seems to be unrelated. I created FLINK-34447 for that one. -- 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]
