[ 
https://issues.apache.org/jira/browse/CALCITE-5841?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated CALCITE-5841:
------------------------------------
    Labels: pull-request-available  (was: )

> Improve the logic of creating JDBCMeta singleton in calcite plus
> ----------------------------------------------------------------
>
>                 Key: CALCITE-5841
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5841
>             Project: Calcite
>          Issue Type: Improvement
>          Components: extensions
>    Affects Versions: 1.34.0
>            Reporter: Ran Tao
>            Assignee: Ran Tao
>            Priority: Major
>              Labels: pull-request-available
>
> current the logic of creating JdbcMeta singleton could be not safe in 
> multi-thread occasion.
> we can add double-checking.
> {code:java}
>     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;
>     } {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to