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

Courses with long names halt mnet log shipping


    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • None
    • 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
    • MNet
    • None
    • Any

      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.

            peterbulmer Peter Bulmer
            peterbulmer Peter Bulmer
            0 Vote for this issue
            2 Start watching this issue


                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.