Skip to content

Conversation

@kinyoklion
Copy link
Member

@kinyoklion kinyoklion commented Dec 13, 2025

Put the load under lock so only a single load is happening concurrently.


Note

Synchronizes LoadAll() in FileDataSource with a lock to prevent concurrent reloads from file watcher events.

  • Server SDK – File data loading:
    • Add _updateLock and wrap LoadAll() body in lock to serialize reloads and avoid concurrent loads from file watcher.
    • All versioning, parsing, and _dataSourceUpdates.Init(...) now occur within the critical section in pkgs/sdk/server/src/Internal/DataSources/FileDataSource.cs.

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

@kinyoklion kinyoklion marked this pull request as ready for review December 13, 2025 00:37
@kinyoklion kinyoklion requested a review from a team as a code owner December 13, 2025 00:37
cursor[bot]

This comment was marked as outdated.

@kinyoklion kinyoklion changed the title fix: Coalesce file watcher updates into a single reload. fix: Update FileDataSource to process reload triggers under lock. Dec 15, 2025
@kinyoklion kinyoklion merged commit 75f51c6 into main Dec 16, 2025
17 checks passed
@kinyoklion kinyoklion deleted the rlamb/file-watcher-coalesce-reload branch December 16, 2025 16:52
kinyoklion pushed a commit that referenced this pull request Jan 12, 2026
🤖 I have created a release *beep* *boop*
---


##
[8.11.0](LaunchDarkly.ServerSdk-v8.10.4...LaunchDarkly.ServerSdk-v8.11.0)
(2026-01-12)


### Features

* **experimental:** Release EAP support for FDv2 data system.
([d78799a](d78799a))


### Bug Fixes

* Update FileDataSource to process reload triggers under lock.
([#199](#199))
([75f51c6](75f51c6))

---
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]
> Publishes `pkgs/sdk/server` v8.11.0 and finalizes package versioning.
> 
> - Adds experimental EAP support for the FDv2 data system
> - Fixes `FileDataSource` to process reload triggers under lock
> - Updates `.release-please-manifest.json` and bumps
`LaunchDarkly.ServerSdk.csproj` from beta to `8.11.0`
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
9fbc071. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
evgenygunko pushed a commit to evgenygunko/Translations that referenced this pull request Jan 13, 2026
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [LaunchDarkly.ServerSdk](https://github.com/launchdarkly/dotnet-core) | nuget | minor | `8.10.4` -> `8.11.0` |

---

### Release Notes

<details>
<summary>launchdarkly/dotnet-core (LaunchDarkly.ServerSdk)</summary>

### [`v8.11.0`](https://github.com/launchdarkly/dotnet-core/releases/tag/LaunchDarkly.ServerSdk-v8.11.0): LaunchDarkly.ServerSdk: v8.11.0

[Compare Source](launchdarkly/dotnet-core@LaunchDarkly.ServerSdk-v8.10.4...LaunchDarkly.ServerSdk-v8.11.0)

##### Features

-   **experimental:** Release EAP support for FDv2 data system. ([d78799a](launchdarkly/dotnet-core@d78799a))

##### Bug Fixes

-   Update FileDataSource to process reload triggers under lock. ([#&#8203;199](launchdarkly/dotnet-core#199)) ([75f51c6](launchdarkly/dotnet-core@75f51c6))

##### Data Saving Mode EAP

This release contains support for our second generation flag delivery protocol, also known as data-saving mode.

This SDK version will operate using our first generation flag delivery protocol unless configured specifcally to use our new protocol.

In the SDK support for the new protocol is defined by a `DataSystem`. Configuring a `DataSystem` will enable the use of the new protocol.

The `DataSystem` includes a more sophisticated configuration for `initializers`, which are a means of getting an initial SDK payload, and `synchronizers` which keep the SDK up to date.

#### Configuration

There are a number of pre-defined configurations available for the data system depending on the SDK deployment.

##### Default

This is the LaunchDarkly recommended default setting for the data system. This configuration uses a two-phase strategy for initialization (getting you) as well as including fallbacks for synchronization.

The SDK will attempt to get an initial payload by making a single poll to our polling endpoints, and then will keep that payload up to date via streaming. If that initial polling process fails, then the SDK can still initialize via streaming once it enters its synchronization phase. Similarly, in the synchronization phase, the SDK can fallback to polling if it experiences issues with streaming.

```csharp
var config = Configuration.Builder("your-sdk-key")
    .DataSystem(Components.DataSystem().Default())
    .Build();
```

##### Polling Only or Streaming Only

The SDK can be configured to only use polling, or only use streaming. This isn't the recommended mode, and in this mode there are not as many fallbacks available.

Polling:

```csharp
var config = Configuration.Builder(Environment.GetEnvironmentVariable("LAUNCHDARKLY_SDK_KEY"))
    .DataSystem(Components.DataSystem().Polling())
    .Build();
```

Streaming:

```csharp
var config = Configuration.Builder(Environment.GetEnvironmentVariable("L...
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