Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix double-checked locking in ConnectionFactory (#11014)
The `_defaultTransport` in `ConnectionFactory` is created using double-checked locking. https://github.com/apache/pinot/blob/03b9d4a708e6d09838e902857ebe1f255ced4ba1/pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/ConnectionFactory.java#L211-L222 However, the current implementation is buggy as described in https://rules.sonarsource.com/java/RSPEC-2168/. To fix it, make the field `volatile`.
- Loading branch information