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

Courses with long names halt mnet log shipping

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.8, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.8.5, 1.8.6, 1.8.7, 1.9, 1.9.1, 1.9.2, 1.9.3
    • Fix Version/s: None
    • Component/s: MNet
    • Labels:
      None
    • Database:
      Any
    • Affected Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      Situation:
      2 networked moodles, (a content provider, and an identity provider),
      The content provider has a course with a name 100 characters long.
      A user logs on to the identity provider and mnets to the content provider. They view the course & take a quiz. They don't immediately log out.

      When the content provider's cron runs, it sends a keepalive to the identity provider to tell them to not log out the roamed student - they're still active. The reply from the identity provider indicates the most recent log record that it knows about. If there is a backlog of logs, a new request is sent "be advised - your student has been looking at course x, and taking quiz y". Where x is 100 characters long, the record fails to insert (in postgres), and the transaction is rolled back. I assume that this occurs for all databases.
      Five minutes later the whole problem repeats.

      This all seems to have come about due to a misalignment between the maximum length of course name in course table, and the maximum length of course name in the mnet_log. Rather than just fixing mnet log. I consider the probabality that there will be other versions of moodle in the future with different field length restrictions, in addition to completely separate applications.

      I have a small fix which limits the length of the field on the receiver (identity provider) end. This fix restricts varchar fields only. If 'remoteuserid' is greater than what a big int can store (or indeed not an number at all), it will still fail and transfers will stall just as they have until now. It is in my opinion that this is too difficult to address.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              peterbulmer Peter Bulmer added a comment -

              In addition to the attached patch, I would be proposing another patch which will increase the size of course name, and relax the associated restriction.

              Show
              peterbulmer Peter Bulmer added a comment - In addition to the attached patch, I would be proposing another patch which will increase the size of course name, and relax the associated restriction.
              Hide
              peterbulmer Peter Bulmer added a comment -

              Let me try that once more:

              In addition to the attached patch, I would be proposing another patch which will increase the size of the course_name field in the mdl_mnet_log table, and relax the associated restriction (applied in the attached patch).

              Show
              peterbulmer Peter Bulmer added a comment - Let me try that once more: In addition to the attached patch, I would be proposing another patch which will increase the size of the course_name field in the mdl_mnet_log table, and relax the associated restriction (applied in the attached patch).
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              +1 for current patch in 19_STABLE and change to 100cc in HEAD ONLY. Only critical DB changes are allowed in stable and this doesn't seem to be critical once the patch above is applied.

              Good catch, ciao

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - +1 for current patch in 19_STABLE and change to 100cc in HEAD ONLY. Only critical DB changes are allowed in stable and this doesn't seem to be critical once the patch above is applied. Good catch, ciao
              Hide
              mjollnir Penny Leach added a comment -

              Pete did you commit this?

              Show
              mjollnir Penny Leach added a comment - Pete did you commit this?
              Hide
              mjollnir Penny Leach added a comment -

              Sorry, I mean, I can see you committed some stuff, just wondering if we can now close the bug

              Show
              mjollnir Penny Leach added a comment - Sorry, I mean, I can see you committed some stuff, just wondering if we can now close the bug
              Hide
              salvetore Michael de Raadt added a comment -

              Thanks for reporting this issue.

              We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported.

              If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

              Michael d;

              lqjjLKA0p6

              Show
              salvetore Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d; lqjjLKA0p6
              Hide
              salvetore Michael de Raadt added a comment -

              I'm closing this issue as it appears to have become inactive and is probably not relevant to a current supported version. If you are encountering this problem or one similar, please launch a new issue.

              Show
              salvetore Michael de Raadt added a comment - I'm closing this issue as it appears to have become inactive and is probably not relevant to a current supported version. If you are encountering this problem or one similar, please launch a new issue.

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: