Steve Carlin has posted comments on this change. ( http://gerrit.cloudera.org:8080/23935 )
Change subject: MPALA-14719: Fixed race condition for Calcite property ...................................................................... Patch Set 3: (1 comment) http://gerrit.cloudera.org:8080/#/c/23935/3/fe/src/main/java/org/apache/impala/service/Frontend.java File fe/src/main/java/org/apache/impala/service/Frontend.java: http://gerrit.cloudera.org:8080/#/c/23935/3/fe/src/main/java/org/apache/impala/service/Frontend.java@3780 PS3, Line 3780: private CompilerFactory getCalciteCompilerFactory(PlanCtx ctx) : throws ImpalaException { > Can't we have threading issues here and set the singleton multiple times? Technically, you're right, but theoretically all that would happen in the worst case is that you'd get an extra initialization of a factory object which would be garbage collected. But having said that, it's better to get it right. It doesn't take up much memory. It is just a factory class with no member. But someone brought up as a Jira to avoid the "Class.forName()" method. I don't think that would matter too much either, but I think I like the most current iteration better where the factory class gets statically initialized. -- To view, visit http://gerrit.cloudera.org:8080/23935 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I80a0207150cf521c297b12a24075ae5f29c5c5ff Gerrit-Change-Number: 23935 Gerrit-PatchSet: 3 Gerrit-Owner: Steve Carlin <[email protected]> Gerrit-Reviewer: Aman Sinha <[email protected]> Gerrit-Reviewer: Csaba Ringhofer <[email protected]> Gerrit-Reviewer: Fang-Yu Rao <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Joe McDonnell <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Peter Rozsa <[email protected]> Gerrit-Reviewer: Steve Carlin <[email protected]> Gerrit-Comment-Date: Wed, 04 Feb 2026 12:31:15 +0000 Gerrit-HasComments: Yes
