Skip to content

feat(events): default the event max age to 24 hours - #549

Open
abelonogov-ld wants to merge 1 commit into
andrey/event-durability-tier3-persistencefrom
andrey/event-max-age-24h
Open

abelonogov-ld wants to merge 1 commit into
andrey/event-durability-tier3-persistencefrom
andrey/event-max-age-24h

Conversation

@abelonogov-ld

@abelonogov-ld abelonogov-ld commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Changes the default LDConfig.eventMaxAge from 7 days to 24 hours. Persisted events that have not been delivered within 24 hours are discarded and counted as dropped, and so is what the SDK stored for a mobile key the application stopped using. Applications can still set eventMaxAge to keep events longer. It has no effect where eventPersistence is .disabled.

Stacked on #538 (tier 3).

  • LDConfig.Defaults.eventMaxAge is now 24 * 60 * 60, and the docs on LDConfig.eventMaxAge and ObjcLDConfig.eventMaxAge say so.
  • LDConfigSpec asserts the new default.
  • Three EventStoreSpec tests that age a batch by 6 days or 1 day and expect it to be kept now age it by 12 hours. The tests that age by 8 or 30 days still exceed the maximum age and are unchanged.

Android counterpart: launchdarkly/android-client-sdk#424.

Tested: LaunchDarklyTests on Mac Catalyst, 1233 tests, 0 failures.


Note

Overview
Lowers the default LDConfig.eventMaxAge from 7 days to 24 hours for persisted, undelivered events (and for stale on-disk data tied to abandoned mobile keys). Apps can still raise eventMaxAge; behavior is unchanged when eventPersistence is .disabled.

LDConfig.Defaults, public docs on LDConfig / ObjcLDConfig, the default-config test in LDConfigSpec, and EventStoreSpec expiry fixtures are updated so “recent” batches are aged by 12 hours instead of 1–6 days while “expired” cases still use 8+ days.

Reviewed by Cursor Bugbot for commit 9bfb52d. Bugbot is set up for automated code reviews on this repo. Configure here.

Persisted events not yet delivered are discarded after 24 hours by default,
instead of 7 days. LDConfig.eventMaxAge still overrides it.

Co-authored-by: Cursor <cursoragent@cursor.com>

This branch has not been deployed

No deployments
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