Skip to content

Conversation

@kinyoklion
Copy link
Member

@kinyoklion kinyoklion commented Jan 30, 2026

Note

Medium Risk
Changes core file-data loading and persistence semantics (new shouldPersist flag/defaults) and introduces new background-thread/file-watcher behavior, which could affect initialization and update delivery timing.

Overview
Adds FDv2 support for file-based flag data by introducing FileData.initializer() (one-shot) and FileData.synchronizer() (watching/streaming) builders that emit FDv2SourceResult change sets/statuses, sharing parsing/loading logic via new FileDataSourceBase.

Refactors the legacy FileDataSourceImpl to delegate to the new FileSynchronizer and adapt FDv2 results back into the old DataSource callbacks, while adding shouldPersist configuration (legacy file DataSource defaults to persisting for compatibility; FDv2 initializer/synchronizer default to not persisting).

Also bumps launchdarkly-java-sdk-common to 2.2.1 and switches local uses of IterableAsyncQueue to the shared com.launchdarkly.sdk.collections.IterableAsyncQueue (removing the in-repo implementation/tests), plus adds new tests for FDv2 file initializer/synchronizer behavior and persistence defaults.

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

@kinyoklion kinyoklion force-pushed the rlamb/sdk-1562/fdv2-file-data-source branch from e613d7c to e7ada4d Compare January 30, 2026 21:09
@kinyoklion kinyoklion force-pushed the rlamb/sdk-1562/fdv2-file-data-source branch from e7ada4d to 1a548dd Compare January 30, 2026 21:11
@kinyoklion

This comment was marked as outdated.

@kinyoklion

This comment was marked as outdated.

@kinyoklion
Copy link
Member Author

bugbot review

@kinyoklion kinyoklion marked this pull request as ready for review January 30, 2026 23:52
@kinyoklion kinyoklion requested a review from a team as a code owner January 30, 2026 23:52
Copy link

@cursor cursor bot left a comment

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 and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

DataBuilder builder = new DataBuilder(duplicateKeysHandling);
int version;
try {
version = dataLoader.load(builder);
Copy link

Choose a reason for hiding this comment

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

Unused variable version assigned but never read

Low Severity

The version variable is assigned the return value of dataLoader.load(builder) but is never used afterward. The version number is internally applied to items within DataLoader.load(), making the return value unnecessary for the caller.

Fix in Cursor Fix in Web

public Initializer build(DataSourceBuildInputs context) {
return delegate.buildInitializer(context);
}
}
Copy link

Choose a reason for hiding this comment

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

Inconsistent closing brace indentation in nested class

Low Severity

The closing brace of FileInitializerBuilder at line 273 has no indentation (column 0), but should have 2-space indentation to match the nested class pattern. Compare with FileSynchronizerBuilder's closing brace at line 378 which correctly uses 2-space indent.

Fix in Cursor Fix in Web

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.

2 participants