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

Deadlock when loading different driver classes concurrently using Class.forName

    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

        1. image-2020-10-09-20-48-48-261.png
          153 kB
          xiaodao
        2. image-2020-10-09-20-49-23-644.png
          93 kB
          xiaodao

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: