Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 3.6.5, 3.7.1, 3.8, 3.9
-
Component/s: Messages
-
Labels:
-
Testing Instructions:
-
Affected Branches:MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
-
Fixed Branches:MOODLE_37_STABLE, MOODLE_38_STABLE
-
Epic Link:
-
Pull from Repository:
-
Pull 3.8 Branch:
MDL-66607-38 -
Pull 3.8 Diff URL:
-
Pull Master Branch:
MDL-66607-master -
Pull Master Diff URL:
-
Story Points:2
Description
Copied from MDL-65493.
It looks like the getLoadNewMessagesCallback function's callback publishes the MessageDrawerEvents.CONVERSATION_NEW_LAST_MESSAGE along with the conversation Id of the now deleted conversation at around the time that the conversation I also deleted, and I suspect that this causes it to be re-added.
This happens in the resetMessagePollTimer for the backOffTimer.
Essentially the timer was running, and a conversation did exist, but it was deleted before the PubSub completes. The Publish of the new last message event occurs after the conversation has been deleted, and as a result it gets re-created.
I'm not sure how best to fix this one. A few things spring to mind, but they may not be ideal...
- stop timers, and cancel any ongoing requests while dialogues are open or not on the relevant screen
- ??
Not really sure as I don't know enough about the messaging code.
Basically, this is a real race condition. We've not detected it before because of the other issues (which are largely fixed in this MDL).