Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-19435

Deadlock when loading different driver classes concurrently using Class.forName

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      when we sink data to multi jdbc outputformat , 

      protected void establishConnection() throws SQLException, ClassNotFoundException {
       Class.forName(drivername);
       if (username == null) {
       connection = DriverManager.getConnection(dbURL);
       } else {
       connection = DriverManager.getConnection(dbURL, username, password);
       }
      }
      

      may cause jdbc driver deadlock. it need to change to synchronized function.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            kezhuw Kezhu Wang
            xiaodao xiaodao
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment