Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-66607

Random messaging failure

    XMLWordPrintable

    Details

    • 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...

      1. stop timers, and cancel any ongoing requests while dialogues are open or not on the relevant screen
      2. ??
        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).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dobedobedoh Andrew Nicols
              Reporter:
              dobedobedoh Andrew Nicols
              Peer reviewer:
              Amaia Anabitarte
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              CiBoT
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              3 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/May/20

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 6 hours, 52 minutes
                  6h 52m