You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: serialize open*/close so racing opens cannot create orphan pools
openTableAsync / openAuthorizedViewAsync / openMaterializedViewAsync
read 'closed' lock-free, then constructed the pool, then inserted it
into sessionPools — close() could CAS closed=true and snapshot
sessionPools in between, leaving the new pool orphaned: never closed,
its callbacks landing on shut-down executors.
Hold sessionPools' monitor across the closed check, the construction,
and the insert. Opens are infrequent (typically once per table at app
startup) so the monitor cost is negligible.
Move close()'s closed flip inside the same monitor too. With every
access now under the lock, downgrade 'closed' from AtomicBoolean to a
plain boolean — the CAS provided no value over a plain read+write
under the lock.
Copy file name to clipboardExpand all lines: java-bigtable/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/Client.java
+70-60Lines changed: 70 additions & 60 deletions
Original file line number
Diff line number
Diff line change
@@ -104,10 +104,10 @@ public class Client implements AutoCloseable {
0 commit comments