Skip to content

feat: Add the FDv2 data system orchestrator - #190

Open
beekld wants to merge 8 commits into
mainfrom
bklimt/SDK-2753/fdv2-orchestrator
Open

feat: Add the FDv2 data system orchestrator#190
beekld wants to merge 8 commits into
mainfrom
bklimt/SDK-2753/fdv2-orchestrator

Conversation

@beekld

@beekld beekld commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the FDv2 orchestrator, the DataSystem implementation that owns the
in-memory store and keeps it populated. It runs an initializer phase to obtain
a basis, then a synchronizer phase for ongoing changes.

The initializer phase tries each initializer in order until one produces a
basis. The synchronizer phase then runs one synchronizer at a time and rotates
between them on three triggers:

  • A fallback timer advances to the next synchronizer after a sustained
    interruption.
  • A recovery timer returns to the primary synchronizer after the recovery
    interval.
  • A terminal error blocks a synchronizer and advances past it.

Initialization is signaled as complete on the first basis and as failed once
every source is exhausted without one, because the client's initialization path
already resolves to success or failure. Synchronizer status transitions are
logged, with interruptions at info (not repeated while ongoing) and terminal
errors at warn.


Note

Overview
Adds FDv2DataSystem, the FDv2 DataSystem implementation that owns an in-memory store and keeps it updated via a tokio run loop.

Initializer phase: tries each initializer factory in order until one returns a non-None changeset; applies it with TransactionalDataStore::apply, signals init_complete(true), and tracks the changeset selector for later sync calls.

Synchronizer phase: SourceManager rotates among synchronizer factories—cyclically skipping blocked sources, with fallback after sustained Interrupted (timer), recovery back to the prime when not on primary, and block + advance on TerminalError. Successful changesets update the store and selector; ChangeSetKind::None does not clobber the selector. Shutdown ends the loop without init signaling; if no basis was ever obtained, init_complete(false) runs once.

Wires the module in fdv2/mod.rs and removes stale dead_code allows on ChangeSet.selector and TransactionalDataStore. Includes broad unit/integration-style tests for rotation, timers, init signaling, and selector propagation.

Reviewed by Cursor Bugbot for commit ffcc8cf. Bugbot is set up for automated code reviews on this repo. Configure here.

@beekld
beekld force-pushed the bklimt/SDK-2753/fdv2-orchestrator branch from 4ea2eb8 to 775e611 Compare August 10, 2026 18:41
@beekld
beekld force-pushed the bklimt/SDK-2753/fdv2-orchestrator branch from 775e611 to 2fa17de Compare August 10, 2026 18:46
@beekld
beekld force-pushed the bklimt/SDK-2753/fdv2-orchestrator branch from 2fa17de to a523fa8 Compare August 12, 2026 21:45
@beekld
beekld force-pushed the bklimt/SDK-2753/fdv2-orchestrator branch from a523fa8 to 3e77e84 Compare August 12, 2026 22:10
Base automatically changed from bklimt/SDK-2742/fdv2-streaming to main August 13, 2026 21:29
@beekld
beekld force-pushed the bklimt/SDK-2753/fdv2-orchestrator branch from 3e77e84 to f3e5a99 Compare August 13, 2026 21:29
@beekld
beekld marked this pull request as ready for review August 13, 2026 21:35
@beekld
beekld requested a review from a team as a code owner August 13, 2026 21:35

@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 f3e5a99. Configure here.

Comment thread launchdarkly-server-sdk/src/fdv2/data_system.rs
@beekld
beekld force-pushed the bklimt/SDK-2753/fdv2-orchestrator branch from f3e5a99 to 58c2a46 Compare August 14, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant