Commit 9c30a60
committed
fix: concurrency issue when saving records
I don't have high hopes for this fix but it was suggested here and I
can't completely ignore the similiarity in how odd this is:
https://learn.microsoft.com/en-us/answers/questions/1186074/database-update-insert-fails
So we shouldn't have the possibility of concurrency issues here because
we are simply inserting everything. Worse case scenario we would end up
with double entries for the same ban. Yet for some reason it seems to
think we're modifying entries when we're supposed to be inserting them.
As such it's reasonable to assume swapping the state to added (despite
the fact that the "AddRange" method is supposed to do that for us) might
resolve the issue. Again, I'm not entirely hopeful but I'm willing to
try. Since the issue is intermittent we have to test in prod.
nullinside-development-group/nullinside-api#701 parent 02ea0b9 commit 9c30a60
File tree
2 files changed
+8
-2
lines changed- src
- Nullinside.Api.TwitchBot/Model
2 files changed
+8
-2
lines changedLines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
178 | 184 | | |
179 | 185 | | |
180 | 186 | | |
0 commit comments