Repository navigation
fix: Fall back from a silent FDv2 synchronizer before data has been received - #237
kinyoklion wants to merge 4 commits into
Conversation
…eceived Co-Authored-By: rlamb@launchdarkly.com <4955475+kinyoklion@users.noreply.github.com>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
There was a problem hiding this comment.
Stale comment
Risk: medium. Not approved: the approval threshold is low only, and this FDv2 startup-fallback change is a moderate SDK data-source behavior change (SDK rule 2: author is allowed; SDK rule 3: no workflow files). Human review is needed and no reviewers were assigned.
Sent by Cursor Approval Agent: SDK - Pull Request Router and Approver
|
❌ Cannot revive Devin session - the session is too old. Please start a new session instead. |
There was a problem hiding this comment.
Risk: medium.
Automated risk review (dry run): Medium
This PR would not be automatically approved. Human approval required.
Why: FDv2DataSource and FDv2DataSourceConditions change production streaming fallback at SDK startup with a 10s silent-synchronizer timeout before any data is applied. That is a moderate data-source behavior change, so it is above the low-only auto-approval threshold. Human review is needed and no reviewers were assigned.
If you disagree with this review, share this PR in #feedback-agent-approvals or submit a changes-requested review explaining why.
Sent by Cursor Approval Agent: Dry-Run PR Approver
Main removed FDv2DataSourceConditions.java, which this branch changed. The merge takes the main version of every file. The next commit makes the change in the current FDv2DataSource. Generated-by: termag
…eceived Before any data has been applied, a synchronizer that sends nothing for 10 seconds is abandoned for the next synchronizer, instead of waiting for an interruption and the 2 minute fallback timeout. Generated-by: termag
There was a problem hiding this comment.
Risk: medium. Not approved: the approval threshold is low only, and this FDv2 startup-fallback change is a moderate SDK data-source behavior change (SDK rule 2: author is allowed; SDK rule 3: no workflow files). Human review is needed and no reviewers were assigned.
Sent by Cursor Approval Agent: SDK - Pull Request Router and Approver
Generated-by: termag
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit cda57c7. Configure here.
| dataSourceUpdates.apply(result.getChangeSet()); | ||
| if (dataSourceUpdates.apply(result.getChangeSet())) { | ||
| dataApplied = true; | ||
| } |
There was a problem hiding this comment.
Rejected payload cancels init fallback
Medium Severity
A synchronizer change set clears fallbackTime before apply is checked. When apply returns false, dataApplied stays false, but the 10-second initialization deadline is already gone. A later interruption then schedules the 2-minute fallback via earliest, so a synchronizer that never gets data into the store is no longer abandoned quickly.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit cda57c7. Configure here.




Summary
Before any data has been applied, a synchronizer that sends nothing for 10 seconds is now abandoned for the next synchronizer. Before this change, it ran until it reported an interruption and the 2 minute fallback timeout passed, and a silent stream reports nothing until its read timeout. This is the SSFDV2 default fallback condition (10 seconds while not initialized, or 2 minutes interrupted). Go made the same fix in launchdarkly/go-server-sdk#461.
FDv2DataSourcesets its fallback deadline 10 seconds after each synchronizer starts, while no data has been applied and another synchronizer is available. Data counts as applied whenDataSourceUpdateSinkV2.applyreturns true. An interruption keeps the earlier deadline.streaming/fdv2fallback suppressions fromtest-suppressions-fdv2.txt.Testing: new
FDv2DataSourceTestcases (5 of them fail on main); sdk-test-harness v3.2.0-alpha.21streaming/fdv2with long-running tests: 36 ran, all passed.SDK-3335
Opened from termag
Note
Overview
Fixes FDv2 synchronizer failover when the feature store still has no accepted data, so a silent stream does not block on the 2-minute steady-state interruption fallback.
FDv2DataSourcenow tracksdataApplied: set only whenDataSourceUpdateSinkV2.applyreturns true (initializer or synchronizer). While!dataAppliedand another synchronizer exists, each newly started synchronizer gets the 10-second initialization fallback deadline from its start; an interruption does not replace that with the longer timeout. After data is accepted once, behavior stays on the steady-state fallback rules (e.g. 2 minutes from first interruption).Adds a large
Initialization Fallbacktest block inFDv2DataSourceTestcovering silent syncs, parked/interrupted primaries, store rejection of initializer data, and timing between init vs steady-state timeouts (aligned with Go launchdarkly/go-server-sdk#461).Reviewed by Cursor Bugbot for commit cda57c7. Bugbot is set up for automated code reviews on this repo. Configure here.