Skip to content

fix: Fall back from a silent FDv2 synchronizer before data has been received - #237

Open
kinyoklion wants to merge 4 commits into
mainfrom
devin/1792084582-fdv2-startup-fallback
Open

kinyoklion wants to merge 4 commits into
mainfrom
devin/1792084582-fdv2-startup-fallback

Conversation

@kinyoklion

@kinyoklion kinyoklion commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

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.

  • FDv2DataSource sets its fallback deadline 10 seconds after each synchronizer starts, while no data has been applied and another synchronizer is available. Data counts as applied when DataSourceUpdateSinkV2.apply returns true. An interruption keeps the earlier deadline.
  • Removes the three streaming/fdv2 fallback suppressions from test-suppressions-fdv2.txt.

Testing: new FDv2DataSourceTest cases (5 of them fail on main); sdk-test-harness v3.2.0-alpha.21 streaming/fdv2 with 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.

FDv2DataSource now tracks dataApplied: set only when DataSourceUpdateSinkV2.apply returns true (initializer or synchronizer). While !dataApplied and 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 Fallback test block in FDv2DataSourceTest covering 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.

…eceived

Co-Authored-By: rlamb@launchdarkly.com <4955475+kinyoklion@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@kinyoklion
kinyoklion marked this pull request as ready for review December 1, 2026 23:53
@kinyoklion
kinyoklion requested a review from a team as a code owner December 1, 2026 23:53

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Open in Web View Automation 

Sent by Cursor Approval Agent: SDK - Pull Request Router and Approver

@devin-ai-integration

Copy link
Copy Markdown
Contributor

❌ Cannot revive Devin session - the session is too old. Please start a new session instead.

View session

@cursor cursor Bot added the risk:medium label Dec 1, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Open in Web View Automation 

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

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Open in Web View Automation 

Sent by Cursor Approval Agent: SDK - Pull Request Router and Approver

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ 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;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit cda57c7. Configure here.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants