Commit dd9092b
committed
Keep the ECOD read lock balanced when loading fails
getDomainsForPdb and getAllDomains release the read lock inside their try
block, so that the loader they call can take the write lock, and re-acquire
it afterwards. When that loader throws, the re-acquisition never happens,
and the outer finally unlocks a lock the thread no longer holds.
The resulting IllegalMonitorStateException is thrown from a finally block,
so it supersedes the IOException that actually caused the failure. Last
night's nightly showed this: one upstream change - ECOD now answers with a
308 that HttpURLConnection will not follow - produced eight failures with
three different-looking causes, only three of which named the redirect.
Re-acquiring in a finally of its own keeps the lock balanced on both paths,
so the original exception propagates intact.1 parent 1fdfd2e commit dd9092b
1 file changed
Lines changed: 18 additions & 6 deletions
Lines changed: 18 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
141 | | - | |
142 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
143 | 149 | | |
144 | 150 | | |
145 | 151 | | |
| |||
244 | 250 | | |
245 | 251 | | |
246 | 252 | | |
247 | | - | |
248 | | - | |
249 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
250 | 262 | | |
251 | 263 | | |
252 | 264 | | |
| |||
0 commit comments