Repository navigation
Commit 4f26c45
authored
[hotfix][Optimizer] Preserve keeper visibility on lookup failure (#4325)
[hotfix][Optimizer] Volatile optimizer touch time; keep groups watched on container lookup failure
touchTime is written by thrift heartbeat threads and read by the keeper
thread without a shared lock - a plain long field is a JMM data race
(stale reads can expire live optimizers; word tearing on 32-bit JVMs).
Declare it volatile.
OptimizerGroupKeeper.processTask called Containers.get outside the
try/finally whose finally-block re-queues the group via keepInTouch.
An unknown container name threw IllegalArgumentException straight into
AbstractKeeper.run's swallow-all catch, permanently removing the group
from scale-out monitoring until restart. Move the lookup and the cast
inside the try.
Regression test testUnknownContainerKeepsGroupWatchedAndResetsMinParallelism
(red before: min-parallelism stayed 2, group silently dropped).
Fix record: docs/fix-records/2026-08-16-fix-15-keeper-visibility-and-container-lookup.md1 parent 1c89469 commit 4f26c45
3 files changed
Lines changed: 38 additions & 2 deletions
File tree
- amoro-ams/src
- main/java/org/apache/amoro/server
- resource
- test/java/org/apache/amoro/server
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1125 | 1125 | | |
1126 | 1126 | | |
1127 | 1127 | | |
1128 | | - | |
1129 | 1128 | | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
1130 | 1133 | | |
1131 | 1134 | | |
1132 | 1135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
279 | 310 | | |
280 | 311 | | |
281 | 312 | | |
| |||
0 commit comments