azagrebin opened a new pull request #9513: [FLINK-13769][Coordination] Close RM connection in TaskExecutor.onStop and do not reconnect URL: https://github.com/apache/flink/pull/9513 ## What is the purpose of the change Fix for the problem that after we merged waiting for all tasks termination in `TaskExecutor.onStop` (#9072). This interrupted the testing mappers earlier in `BatchFineGrainedRecoveryITCase`, causing concurrency problems with the next slot allocation. The JM got notified about task failure faster and requested quickly a slot from RM which has not realised yet that the slot of the stopping TM cannot be used anymore. This led to deploying the recovered task into the just killed TM. To fix this we need to deregister TM with the RM at the beginning of the `TaskExecutor.onStop`. ## Brief change log - Call `closeResourceManagerConnection` in beginning of `TaskExecutor.onStop`. - Do not call `reconnectToResourceManager` in `TaskExecutor.disconnectResourceManager` if TM RPC Endpoint is stopping. ## Verifying this change loop `BatchFineGrainedRecoveryITCase` on Travis. ## 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, Yarn/Mesos, 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)
---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services
