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
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