Repository navigation
feat(events): default the event max age to 24 hours - #549
Open
abelonogov-ld wants to merge 1 commit into
Open
abelonogov-ld wants to merge 1 commit into
abelonogov-ld wants to merge 1 commit into
Conversation
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
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.
Changes the default
LDConfig.eventMaxAgefrom 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 seteventMaxAgeto keep events longer. It has no effect whereeventPersistenceis.disabled.Stacked on #538 (tier 3).
LDConfig.Defaults.eventMaxAgeis now24 * 60 * 60, and the docs onLDConfig.eventMaxAgeandObjcLDConfig.eventMaxAgesay so.LDConfigSpecasserts the new default.EventStoreSpectests 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:
LaunchDarklyTestson Mac Catalyst, 1233 tests, 0 failures.Note
Overview
Lowers the default
LDConfig.eventMaxAgefrom 7 days to 24 hours for persisted, undelivered events (and for stale on-disk data tied to abandoned mobile keys). Apps can still raiseeventMaxAge; behavior is unchanged wheneventPersistenceis.disabled.LDConfig.Defaults, public docs onLDConfig/ObjcLDConfig, the default-config test inLDConfigSpec, andEventStoreSpecexpiry 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.