JingsongLi opened a new pull request #9107: [FLINK-13253][jdbc] Deadlock may occur in JDBCUpsertOutputFormat URL: https://github.com/apache/flink/pull/9107 ## What is the purpose of the change In close, it await the flush scheduler terminal, but it hold the lock of JDBCUpsertOutputFormat instance, maybe the async thread is waiting for this lock in the flush method, so there might be a deadlock here. First, it should not await scheduler terminal, because it has flushed all data to jdbc, what we should do is let async thread quit. Second, we should add lock outside the closed check in the flusher, in this way, we can ensure async thread secure exiting. ## Verifying this change Manual test ## 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
---------------------------------------------------------------- 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
