Commit 75f51c6
authored
fix: Update FileDataSource to process reload triggers under lock. (#199)
Put the load under lock so only a single load is happening concurrently.
<!-- CURSOR_SUMMARY -->
---
> [!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`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
b32dc5a. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 6c63264 commit 75f51c6
1 file changed
+30
-25
lines changedLines changed: 30 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
| 92 | + | |
95 | 93 | | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
104 | 98 | | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
111 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
112 | 124 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | 125 | | |
121 | 126 | | |
122 | 127 | | |
| |||
0 commit comments