Commit d122ed9
authored
fix: closes pool maintainer on invalidation (#784)
* fix: closes pool maintainer on invalidation
When the session pool is marked as invalid, we immediately close the
pool maintainer in order to keep it from trying to replinish the pool.
This way we prevent useless batch create sessions requests.
* fix: checks for pool maintainer closed status
When closing the pool, only waits for the pool maintainer to close if it
has not been closed before.
* fix: only closes pool maintainer if not closed
Makes sure to close the pool maintainer only if it has not been closed
already. Also before returning to the caller, makes sure to mark the
closing as complete if there are no pending closures.
* fix: avoids npe when closing pool maintainer
* fix: checks pool maintainer is not closed on close
Verifies that the pool maintainer is not closed before closing it. Also
moves the check of pendingClosures into the synchronized block to make
sure no stale reads are made.1 parent c7dc6e6 commit d122ed9
File tree
1 file changed
+29
-8
lines changed- google-cloud-spanner/src/main/java/com/google/cloud/spanner
1 file changed
+29
-8
lines changedLines changed: 29 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1595 | 1595 | | |
1596 | 1596 | | |
1597 | 1597 | | |
| 1598 | + | |
1598 | 1599 | | |
1599 | 1600 | | |
1600 | 1601 | | |
| |||
1621 | 1622 | | |
1622 | 1623 | | |
1623 | 1624 | | |
1624 | | - | |
1625 | | - | |
1626 | | - | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
1627 | 1631 | | |
1628 | 1632 | | |
1629 | 1633 | | |
1630 | 1634 | | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
1631 | 1641 | | |
1632 | 1642 | | |
1633 | 1643 | | |
1634 | | - | |
| 1644 | + | |
1635 | 1645 | | |
1636 | 1646 | | |
1637 | 1647 | | |
| |||
1643 | 1653 | | |
1644 | 1654 | | |
1645 | 1655 | | |
1646 | | - | |
| 1656 | + | |
1647 | 1657 | | |
1648 | 1658 | | |
1649 | 1659 | | |
| |||
2126 | 2136 | | |
2127 | 2137 | | |
2128 | 2138 | | |
| 2139 | + | |
2129 | 2140 | | |
2130 | 2141 | | |
2131 | 2142 | | |
| |||
2161 | 2172 | | |
2162 | 2173 | | |
2163 | 2174 | | |
2164 | | - | |
2165 | | - | |
2166 | 2175 | | |
2167 | | - | |
| 2176 | + | |
| 2177 | + | |
| 2178 | + | |
| 2179 | + | |
| 2180 | + | |
| 2181 | + | |
| 2182 | + | |
2168 | 2183 | | |
2169 | 2184 | | |
2170 | 2185 | | |
| |||
2180 | 2195 | | |
2181 | 2196 | | |
2182 | 2197 | | |
| 2198 | + | |
| 2199 | + | |
| 2200 | + | |
| 2201 | + | |
| 2202 | + | |
2183 | 2203 | | |
| 2204 | + | |
2184 | 2205 | | |
2185 | 2206 | | |
2186 | 2207 | | |
| |||
0 commit comments