Repository navigation
Conversation
beekld
marked this pull request as ready for review
November 2, 2026 21:06
beekld
force-pushed
the
bklimt/SDK-3425/private-condition-clock
branch
from
November 2, 2026 21:31
9feb2a1 to
940feda
Compare
beekld
force-pushed
the
bklimt/SDK-3425/private-condition-clock
branch
from
November 2, 2026 21:59
940feda to
0d6372b
Compare
kinyoklion
approved these changes
Nov 2, 2026
beekld
force-pushed
the
bklimt/SDK-3425/private-condition-clock
branch
from
November 3, 2026 00:05
0d6372b to
3db133f
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
#489 reset the public
DataSourceStatus.StateSinceto the current time whenever a synchronizer started, even whenStatedidn't change, and without broadcasting the new status.StateSinceis documented as the timeStatemost recently changed. An app that measures how long the SDK has beenInterruptedhad its clock reset on every failover, and status listeners held a differentStateSincethanGetStatus().The reset existed so that each synchronizer gets its own fallback and recovery window. The data system now records when the current synchronizer started in a private field. The fallback and recovery conditions measure from the later of that time and
StateSince, so their timing is unchanged.StateSinceagain changes only whenStatechanges.Note
Overview
DataSourceStatus.StateSinceis no longer reset when a synchronizer starts. Starting a synchronizer used to callrestartStatusClock(), which bumpedStateSinceeven thoughStatestayed the same (e.g. stillInterruptedduring failover), breaking apps that measure outage duration and leaving listeners out of sync withGetStatus().The synchronizer loop now records
syncStartedAtwhen each synchronizer starts. Fallback and recovery predicates still get a per-synchronizer window by evaluatingconditionActionagainst the later ofStateSinceandsyncStartedAt(local copy only—the stored status updatesStateSinceonly whenStatechanges inmaybeUpdateStatus).A regression test asserts that after primary failure and secondary start,
StateSinceis unchanged.Reviewed by Cursor Bugbot for commit 3db133f. Bugbot is set up for automated code reviews on this repo. Configure here.