Issue Details (XML | Word | Printable)

Key: MDL-17038
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Peter Bulmer
Reporter: Peter Bulmer
Votes: 0
Watchers: 1
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Courses with long names halt mnet log shipping

Created: 28/Oct/08 11:07 AM   Updated: 28/Oct/08 05:59 PM
Return to search
Component/s: Networking
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

File Attachments: 1. File trim.diff (1 kB)


Database: Any
Participants: Eloy Lafuente (stronk7) and Peter Bulmer
Security Level: None
Affected Branches: MOODLE_18_STABLE, MOODLE_19_STABLE


 Description  « Hide
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.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Peter Bulmer added a comment - 28/Oct/08 11:37 AM
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.

Peter Bulmer added a comment - 28/Oct/08 11:42 AM
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).


Eloy Lafuente (stronk7) added a comment - 28/Oct/08 05:59 PM
+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