Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-5841

Improve the logic of creating JDBCMeta singleton in calcite plus

    XMLWordPrintableJSON

Details

    Description

      current the logic of creating JdbcMeta singleton could be not safe in multi-thread occasion.

      we can add double-checking.

          private static JdbcMeta getInstance() {
            if (instance == null) {
              try {
                instance =
                    new JdbcMeta(CalciteConnectionProvider.DRIVER_URL,
                        CONNECTION_PROVIDER.provideConnectionInfo());
              } catch (SQLException | IOException e) {
                throw new RuntimeException(e);
              }
            }
            return instance;
          } 

      Attachments

        Issue Links

          Activity

            People

              taoran Ran Tao
              taoran Ran Tao
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: