From 8b689d083efdb3fdcaa10c21bfa9a97d629ae693 Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Tue, 27 Jun 2017 17:32:19 +0100 Subject: [PATCH] Fix the copy+Pasted comment --- .../dendrite/federationsender/consumers/roomserver.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/github.com/matrix-org/dendrite/federationsender/consumers/roomserver.go b/src/github.com/matrix-org/dendrite/federationsender/consumers/roomserver.go index 2d9c06530..c0c19d8f7 100644 --- a/src/github.com/matrix-org/dendrite/federationsender/consumers/roomserver.go +++ b/src/github.com/matrix-org/dendrite/federationsender/consumers/roomserver.go @@ -67,9 +67,10 @@ func (s *OutputRoomEvent) Start() error { return s.roomServerConsumer.Start() } -// onMessage is called when the sync server receives a new event from the room server output log. -// It is not safe for this function to be called from multiple goroutines, or else the -// sync stream position may race and be incorrectly calculated. +// onMessage is called when the federation server receives a new event from the room server output log. +// It is unsafe to call this with messages for the same room in multiple gorountines +// because updates it will likely fail with a types.EventIDMismatchError when it +// realises that it cannot update the room state using the deltas. func (s *OutputRoomEvent) onMessage(msg *sarama.ConsumerMessage) error { // Parse out the event JSON var output api.OutputRoomEvent