Repository navigation
Conversation
RealDataStoreService wrapped every exception of setPreference and deletePreference, including CancellationException, in a new Exception without a cause. A write cancelled because its screen closed, e.g. of the credential metadata cache when leaving the credential selection, was reported as "Could not persist cache", and the caller was not cancelled. CancellationException is now rethrown as is, and other exceptions are kept as the cause.
gp-iaik
force-pushed
the
fix/datastore-cancellation
branch
from
October 30, 2026 10:08
2730dc8 to
8500089
Compare
gp-iaik
changed the base branch from
feature/launchpad-2026-post
to
release/5.9.2-rc
October 30, 2026 10:08
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.
Stacked on
release/5.9.2-rc.RealDataStoreService.setPreferenceanddeletePreferencecaught everyThrowable, includingCancellationException, and threw a newExceptionwithout a cause. On a device, leaving the credential selection cancelled a write ofcredential_metadata_cache. The write was logged asCould not persist cache 'credential_metadata_cache', and the caller was not cancelled.Changes
CancellationExceptionis rethrown unchanged.Checks:
:androidApp:compileDebugKotlin,:shared:compileKotlinMetadataand:shared:testAndroidHostTest; all pass.RealDataStoreServiceTest: cancelling a pending write throwsCancellationException.🤖 Generated with Claude Code