fix: address threading and resource management feedback on android-sdk-framework#255
Merged
typotter merged 1 commit intoMay 29, 2026
Conversation
…k-framework - volatile on pollingIntervalMs/pollingJitterMs in BaseAndroidClient (builder thread writes, polling thread reads — no synchronization guard existed) - volatile on EppoClient.instance singleton field - FileBackedByteStore: IO_EXECUTOR demoted from static final to instance-level ExecutorService; implements Closeable with shutdown() so tests can reclaim the IO thread - CachingConfigurationStore: remove optimistic update pattern in saveConfiguration(); disk write now happens first and in-memory cache is only updated on success, eliminating the window where getConfiguration() could return an unpersisted value
1f7c4af to
8249490
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.
Summary
Addresses the actionable code review feedback from #251. Skips architectural/naming questions that need separate discussion.
Fixed:
volatileonpollingIntervalMs/pollingJitterMsinBaseAndroidClient— builder thread writes, polling thread reads with no synchronizationvolatileonEppoClient.instancesingleton fieldFileBackedByteStore:IO_EXECUTORdemoted fromstatic finalto instance-levelExecutorService; class now implementsCloseableso callers (and tests) can shut down the IO threadCachingConfigurationStore: removed optimistic update + revert pattern insaveConfiguration(); disk write now happens first and in-memory cache updates only on success, closing the window wheregetConfiguration()could return an unpersisted valueSkipped (need discussion):
EppoClientPollingTestpoll verification via spiesAndroidBaseClientrenamebuildAndInit()timeout (investigated — existingfailCountlogic handles HTTP failure + cache miss correctly; not a real hang)Depends on
#251