Repository navigation
fix: fall back from a silent synchronizer during FDv2 startup - #461
Merged
Merged
Conversation
A synchronizer that fails permanently during startup reports Off, which the data system publishes as Interrupted. Nothing restored Initializing, so the ten-second startup fallback branch -- which tested the status value -- was unreachable for the rest of startup and only the one-minute runtime timer applied. When the next synchronizer connected and then stayed silent it produced no result for the loop to act on, so the client's start-wait expired before the fallback could advance to a healthy source. Key the startup branch on whether data has ever been applied rather than on the status value. The fallback and recovery conditions previously had zero execution coverage; this adds in-package tests for both the predicate and the multi-synchronizer loop path. SDK-3235
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 338196d. Configure here.
kinyoklion
approved these changes
Oct 8, 2026
Describe what the startup and steady-state windows mean and how they are told apart, rather than narrating the previous status-keyed condition. The history belongs in the pull request, not in the code.
tanderson-ld
pushed a commit
that referenced
this pull request
Oct 12, 2026
🤖 I have created a release *beep* *boop* --- ## [7.19.1](v7.19.0...v7.19.1) (2026-10-12) ### Bug Fixes * fall back from a silent synchronizer during FDv2 startup ([#461](#461)) ([c66100e](c66100e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Overview** > **Release 7.19.1** — bumps the SDK version from **7.19.0** to **7.19.1** via Release Please (`internal/version.go`, `.release-please-manifest.json`) and adds the matching **CHANGELOG** entry. > > The release ships one behavioral fix (already merged as [#461](#461)): during **FDv2** startup, the synchronizer loop now **falls back past a “silent” synchronizer** (one that never reports status or data). Startup fallback is keyed off whether **any data has been applied**, not only on data-source status, so a permanently failed first synchronizer followed by a non-reporting second no longer blocks reaching a later healthy synchronizer within the **10-second** startup window. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit e9070d1. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2 of 3 tasks
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.

Requirements
Related issues
SDK-3235. Also fixes the one known failure in the nightly contract tests added in #454:
streaming/fdv2/permanent fallback with recovery.Describe the solution you've provided
The data system has two fallback timers, selected by reading the status: a 10-second one for startup (
cannotInitialize) and a 1-minute one for steady state (interruptedAtRuntime).A synchronizer that fails permanently during startup reports
Off, which the loop publishes asInterrupted. Nothing restoresInitializing, so the startup branch — which tested the status value — was unreachable for the rest of startup, leaving only the 1-minute timer. That only becomes visible when the next synchronizer connects and then stays silent: it produces no result for the loop to act on, so the loop depends entirely on the timer, and the client's start-wait expires first. The healthy source is never contacted.Keying on whether data has ever been applied expresses the actual predicate and cannot go stale as states are added. Runtime behavior is unchanged: once data is applied, only the 1-minute timer applies.
Pre-existing, not a regression — it reproduces on 7.15.6, before the RETRY work.
Describe alternatives you've considered
Initializingon removal. Rejected on cross-SDK evidence: Java and .NET both reportINITIALIZING → INTERRUPTEDand neither re-publishesInitializingafter a source fails. .NET makes that choice explicitly ("spoof interrupted"). This keeps Go's externally visible status sequence identical to today's and consistent with both siblings.Interruptedto the startup branch's state check. Rejected:Interrupted && >10ssubsumesInterrupted && >1min, which would make the runtime timer dead code and abandon a source after 10 seconds instead of a minute — and recovery back to it takes 5 minutes of healthy operation.StateSinceon the transition. Insufficient: the 1-minute timer would restart and fire at ~70s, still past a 60s start-wait.Additional context
The fallback and recovery conditions had zero execution coverage before this (the closure bodies measured 0 executions, while the file overall sat at 59.6%) — they are only evaluated on a 10-second tick with 2+ synchronizers configured, which nothing but the long-running contract test reached. The new in-package tests cover both the predicate and the multi-synchronizer loop path, and both fail when the fix is reverted.
Verified: all 4
streaming/fdv2fallback contract tests pass against the patched SDK, including the recovery assertion that had never executed for Go; all 28 root-package FDv2 end-to-end tests pass;golangci-lintreports 0 issues.Note
Overview
Fixes FDv2 multi-synchronizer startup so a synchronizer that connects but never delivers data can still be abandoned within the 10s window, even after an earlier source fails permanently and the data source status stays Interrupted instead of Initializing.
The startup branch of
fallbackCondnow keys off!fdv2.dataAppliedrather thanDataSourceStateInitializing, so the short timer stays active until the first payload is applied; steady-state behavior after data has been applied is unchanged (still 1 minute on Interrupted).Adds in-package tests that exercise the predicate (including Interrupted before any data) and a multi-synchronizer loop that waits out the real 10s fallback twice past a silent synchronizer.
Reviewed by Cursor Bugbot for commit fc2eca8. Bugbot is set up for automated code reviews on this repo. Configure here.