Skip to content

Commit 4ce7ddf

Browse files
authored
Merge branch 'master' into bfops/check-navjs
2 parents 63dabcb + 62a1378 commit 4ce7ddf

4 files changed

Lines changed: 15 additions & 14 deletions

File tree

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ tokio = { version = "1.37", features = ["full"] }
265265
tokio_metrics = { version = "0.4.0" }
266266
tokio-postgres = { version = "0.7.8", features = ["with-chrono-0_4"] }
267267
tokio-stream = "0.1.17"
268-
tokio-tungstenite = { version = "0.26.2", features = ["native-tls"] }
268+
tokio-tungstenite = { version = "0.27.0", features = ["native-tls"] }
269269
tokio-util = { version = "0.7.4", features = ["time"] }
270270
toml = "0.8"
271271
toml_edit = "0.22.22"

crates/client-api/src/routes/subscribe.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ fn ws_recv_loop(
772772
| WsError::Capacity(_)
773773
| WsError::Protocol(_)
774774
| WsError::WriteBufferFull(_)
775-
| WsError::Utf8
775+
| WsError::Utf8(_)
776776
| WsError::AttackAttempt
777777
| WsError::Url(_)
778778
| WsError::Http(_)

sdks/csharp/src/Table.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,15 @@ void IRemoteTableHandle.Apply(IEventContext context, MultiDictionaryDelta<object
303303
// This is a local operation -- it only looks at our indices and doesn't invoke user code.
304304
// So we don't need to wait for other tables to be updated to do it.
305305
// (And we need to do it before any PostApply is called.)
306+
// Reminder: We need to loop through the removed entries to delete them prior to inserting the new entries,
307+
// in order to avoid keys an error with the same key already added.
308+
foreach (var (_, value) in wasRemoved)
309+
{
310+
if (value is Row oldRow)
311+
{
312+
OnInternalDeleteHandler.Invoke(oldRow);
313+
}
314+
}
306315
foreach (var (_, value) in wasInserted)
307316
{
308317
if (value is Row newRow)
@@ -335,14 +344,6 @@ void IRemoteTableHandle.Apply(IEventContext context, MultiDictionaryDelta<object
335344
throw new Exception($"Invalid row type for table {RemoteTableName}: {newValue.GetType().Name}");
336345
}
337346
}
338-
339-
foreach (var (_, value) in wasRemoved)
340-
{
341-
if (value is Row oldRow)
342-
{
343-
OnInternalDeleteHandler.Invoke(oldRow);
344-
}
345-
}
346347
}
347348

348349
void IRemoteTableHandle.PostApply(IEventContext context)

0 commit comments

Comments
 (0)