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
{{ message }}
Repository navigation
Publish refreshed FromConfigMap data as a coherent snapshot #4975
KubernetesFromConfigMapProcessor injects a live Caffeine map, then refreshes it by putting new entries one at a time and deleting obsolete entries afterward. Readers can observe partially applied configuration, containing a mix of old/new values and obsolete keys. The implementation already contains a TODO noting that refresh should be atomic.
Refresh a ConfigMap that changes several related keys and removes others while another thread iterates/copies the injected map. The reader can observe an intermediate state that is neither the old nor the new ConfigMap.
Impact
Inconsistent configuration snapshots can cause application errors during refresh. Suggested priority: medium.
Requested fix and acceptance criteria
Publish each successfully fetched ConfigMap as a complete snapshot while keeping previously injected Map references live and updating.
Define the supported consistency guarantee precisely, including iteration/snapshot reads. Do not claim transactional consistency across unrelated Map.get calls that straddle a refresh.
Preserve existing supported Map behavior, or explicitly document and test any necessary compatibility change. Avoid a one-time field replacement that leaves retained Map references permanently stale.
Keep deletion/null-data behavior correct.
Add deterministic concurrency/regression coverage demonstrating coherent snapshot observation and continued visibility of later updates through the original injected reference.
Separate issues address refresh exception recovery, cadence, and polling cache isolation. Keep this PR focused on publication semantics.
Agent instructions
Implement the simplest complete fix, run relevant tests, and open a pull request referencing and closing this issue. Follow the repository's PR template and contribution conventions. Other agents may change this processor; keep the patch focused and account for overlap when integrating.
Activity