[hotfix][Optimizer] Preserve keeper visibility on lookup failure - #4325
Open
czy006 wants to merge 1 commit into
Open
[hotfix][Optimizer] Preserve keeper visibility on lookup failure#4325czy006 wants to merge 1 commit into
czy006 wants to merge 1 commit into
Conversation
czy006
marked this pull request as ready for review
August 17, 2026 09:11
…d 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.md
czy006
force-pushed
the
codex/hotfix-optimizer-keeper-visibility
branch
from
August 18, 2026 02:16
9df3593 to
31dc7be
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brief change log
Make optimizer touch-time visibility explicit and keep resource groups under observation when a container lookup fails transiently, so the keeper can retry on a later cycle.
How was this patch tested?
TestOptimizerGroupKeeperlocally with JDK 11 before creating this pull request.Documentation