Skip to content

Commit ae9600e

Browse files
committed
doc(sdk): Remove mention of #3941.
This patch removes the mention of #3941 now it's closed.
1 parent b5d5a41 commit ae9600e

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

crates/matrix-sdk/src/latest_events/latest_event.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -626,15 +626,12 @@ impl LatestEventValueBuilder {
626626
// First, compute the new value. Then we remove the sent local event from the
627627
// buffer.
628628
//
629-
// Why in this order? Because in between sending and remote echoing, the event
630-
// will only be stored as a local echo and not as a full event in the event
631-
// cache. Just after sending, it won't show up as a `LatestEventValue` as it
632-
// will immediately be replaced by an event from the event cache. By computing
633-
// the new value before removing it from the buffer, we ensure the
634-
// `LatestEventValue` represents the just sent local event.
635-
//
636-
// Note: the next sync may not include the just sent local event. This is a race
637-
// condition we are aware of, see https://github.com/matrix-org/matrix-rust-sdk/issues/3941.
629+
// Why in this order? Because even if the Send Queue inserts the sent event in
630+
// the Event Cache, the Send Queue sends its updates (this update) before the
631+
// insertion in the Event Cache. Thus, the Event Cache isn't yet aware of the
632+
// newly sent event yet at this time of execution. Computing the
633+
// `LatestEventValue` from the local ones ensure no hide-and-seek game with the
634+
// event before it lands in the Event Cache.
638635
let value = Self::new_local_or_remote(
639636
buffer_of_values_for_local_events,
640637
room_event_cache,

0 commit comments

Comments
 (0)