Skip to content

Conversation

@jsonbailey
Copy link
Contributor

@jsonbailey jsonbailey commented Dec 23, 2025

Note

Establishes the experimental FDv2 data system foundation and wiring without concrete streaming/polling implementations.

  • Adds DataSystemConfig and LaunchDarkly::DataSystem builder (default, streaming, polling, custom, daemon, persistent_store) for configuring initializers/synchronizers and data store mode
  • Introduces FDv2 protocol and interfaces in interfaces/data_system.rb and impl/data_system/protocolv2.rb (events, selectors, changesets, payloads, initializers/synchronizers contracts)
  • Implements Impl::DataSystem::FDv2 orchestrator to run initializers, manage primary/secondary/fallback synchronizers, track readiness, and report data availability
  • Adds data/storage components: InMemoryFeatureStoreV2, dual-mode Impl::DataStore::Store (memory vs persistent), and FeatureStoreClientWrapperV2 with availability monitoring/recovery
  • Provides V2 status providers for data source and data store plus enhanced DependencyTracker and a minor Model.deserialize guard; documents FeatureStore#stop idempotency
  • Extends Config with experimental datasystem_config option

Written by Cursor Bugbot for commit 1de1704. This will update automatically on new commits. Configure here.

@jsonbailey jsonbailey requested a review from a team as a code owner December 23, 2025 20:08
# @param fdv1_fallback_synchronizer [Proc(Config) => LaunchDarkly::Interfaces::DataSystem::Synchronizer, nil]
# The (optional) builder proc for FDv1-compatible fallback synchronizer
#
def initialize(initializers:, primary_synchronizer:, secondary_synchronizer:,
Copy link
Member

Choose a reason for hiding this comment

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

You don't have to change it in this PR, but remember that we want to make synchronizers a list like the initializers.

Co-authored-by: Matthew M. Keeler <[email protected]>
@jsonbailey jsonbailey requested a review from keelerm84 December 24, 2025 22:39
Base automatically changed from jb/sdk-1541/convert-client-to-datasystem to main January 5, 2026 13:39
kind_data.each do |key, item|
items_of_kind[key] = item
end
end
Copy link

Choose a reason for hiding this comment

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

Missing version check allows stale updates to overwrite newer data

High Severity

The apply_delta method in InMemoryFeatureStoreV2 unconditionally overwrites items without checking version numbers. The existing InMemoryFeatureStore.upsert method correctly compares old[:version] < item[:version] before updating to prevent out-of-order updates from overwriting newer data. Without this check, network issues causing out-of-order delivery, retries, or reconnections could result in older flag/segment versions overwriting newer ones, leading to inconsistent SDK state and potentially incorrect flag evaluations.

Fix in Cursor Fix in Web

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll talk with the team about this as it seems like a behavior question. We will address in a separate PR if needed.

@jsonbailey jsonbailey merged commit 2492c12 into main Jan 7, 2026
10 checks passed
@jsonbailey jsonbailey deleted the jb/sdk-1542/fdv2-datasystem-protocol-implementation branch January 7, 2026 22:22
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.

3 participants