fix: unstick property sending flag + invalidate named-key RC cache on attach/detach (DEV-1232) - #852
Merged
SpertsyanKM merged 3 commits intoJul 28, 2026
Conversation
…on attach Two remote-config-review defects (A6): isSendingScheduled could stay true forever: the flag was reset only on the non-empty send branch, so a scheduled job swallowed by an in-flight request (or firing on an already-drained storage) left it set — and every later setUserProperty skipped scheduling until a background/RC trigger. Reset the flag on both branches and schedule a follow-up send for properties saved while a request was in flight (they are not part of the sent snapshot). attach/detach of an experiment or remote configuration invalidated only the empty-context-key cache entry, so configs under named context keys stayed stale until process restart. The SDK addresses attach by entity id and cannot know which context key it serves — drop every cached config. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y4V5cx2SMU4VrfPntwfKJ9
…n-flight RC loads Review follow-ups: - UserPropertiesStorage.clear now removes entries only when the value still matches the sent snapshot (ConcurrentHashMap.remove(key, value)). A key overwritten while its previous value was in flight survives the post-send cleanup and is delivered by the follow-up send — previously the new value was silently lost. - QRemoteConfigManager gains an invalidation generation: attach/detach and user change bump it, loads capture it at start and skip the cache write if it moved. An in-flight response evaluated before the invalidating event can no longer be re-cached as fresh (single-key and list paths). - Documented the tolerated isSendingScheduled false-with-pending-job state so the flag reset is not "fixed" back into the stuck-flag bug. Tests: value-conditional clear, no-double-schedule guard on the follow-up send, all four attach/detach entry points with callback-survival assertions, stale in-flight re-cache prevention. testDebugUnitTest and detektAll green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y4V5cx2SMU4VrfPntwfKJ9
Delivery assertion on the in-flight invalidation test (the generation guard must skip only the cache write — the response still reaches the waiting caller and isInProgress resets), a list-path counterpart (the guard is the only barrier there, since attach does not replace the map), and named per-entry-point assertion messages in the four-way invalidation loop. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y4V5cx2SMU4VrfPntwfKJ9
SpertsyanKM
deleted the
kamo/dev-1232-android-sdk-zalipanie-issendingscheduled-posle-force-flasha
branch
July 28, 2026 13:22
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.
A6 from the production-defects block of the Remote Config targeting review (dash-mono PR #674). Linear: DEV-1232.
Stuck
isSendingScheduledflagThe flag was reset only on the non-empty send branch. If a scheduled job fired while a request was already in flight (early return), or fired on an already-drained storage, the flag stayed
true— and every subsequentsetUserPropertyskipped scheduling until the app went to background or the next remote-config request. Now:Named context keys invalidation on attach/detach
Attaching/detaching an experiment or a remote configuration invalidated only the empty-context-key cache entry — configs under named context keys stayed stale until process restart. The SDK addresses attach by entity id and cannot know which context key that entity serves, so every cached config is dropped now (
invalidateLoadedConfigs).Tests
+5 unit tests (stuck flag on both branches, follow-up send, named-key invalidation for both config and experiment attach).
:sdk:testDebugUnitTestanddetektAllare green.🤖 Generated with Claude Code
https://claude.ai/code/session_01Y4V5cx2SMU4VrfPntwfKJ9