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

Random messaging failure

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      CI

      Random fails should cease

      Integration

      You may wish to run the attached 66607.feature file a number of times.
      It is just a copy of the scenario which was picking this issue up but with many attempts.

      Note: Typically the issue is only seen on newer hardware as this was caused by a race conditioin.

      Show
      CI Random fails should cease Integration You may wish to run the attached 66607.feature file a number of times. It is just a copy of the scenario which was picking this issue up but with many attempts. Note: Typically the issue is only seen on newer hardware as this was caused by a race conditioin.
    • Affected Branches:
      MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_37_STABLE, MOODLE_38_STABLE
    • Pull Master Branch:
      MDL-66607-master
    • 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 Lyons
              Reporter:
              dobedobedoh Andrew Lyons
              Peer reviewer:
              Amaia Anabitarte Amaia Anabitarte
              Integrator:
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Tester:
              CiBoT CiBoT
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              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