Skip to content

fix: address threading and resource management feedback on android-sdk-framework#255

Merged
typotter merged 1 commit into
typo/v4/add-framework-modulefrom
typo/v4/framework-feedback-fixes
May 29, 2026
Merged

fix: address threading and resource management feedback on android-sdk-framework#255
typotter merged 1 commit into
typo/v4/add-framework-modulefrom
typo/v4/framework-feedback-fixes

Conversation

@typotter

Copy link
Copy Markdown
Collaborator

Summary

Addresses the actionable code review feedback from #251. Skips architectural/naming questions that need separate discussion.

Fixed:

  • volatile on pollingIntervalMs/pollingJitterMs in BaseAndroidClient — builder thread writes, polling thread reads with no synchronization
  • volatile on EppoClient.instance singleton field
  • FileBackedByteStore: IO_EXECUTOR demoted from static final to instance-level ExecutorService; class now implements Closeable so callers (and tests) can shut down the IO thread
  • CachingConfigurationStore: removed optimistic update + revert pattern in saveConfiguration(); disk write now happens first and in-memory cache updates only on success, closing the window where getConfiguration() could return an unpersisted value

Skipped (need discussion):

  • EppoClientPollingTest poll verification via spies
  • Default no-op client instance
  • AndroidBaseClient rename
  • buildAndInit() timeout (investigated — existing failCount logic handles HTTP failure + cache miss correctly; not a real hang)

Depends on

#251

…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
@typotter typotter force-pushed the typo/v4/framework-feedback-fixes branch from 1f7c4af to 8249490 Compare May 29, 2026 06:33
@typotter typotter marked this pull request as ready for review May 29, 2026 06:46
@typotter typotter merged commit 3ea6600 into typo/v4/add-framework-module May 29, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant