mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #61322
[Bug 1906723] [NEW] Artefacts are created before the author is created according to their ctime
Public bug reported:
Some how it is possible for a usr.ctime value to be newer than an
artefact.ctime value when the artefact.owner = usr.id
To check this out do the following:
SELECT a.id AS artefact_id, a.ctime AS artefact_ctime, u.ctime AS
user_ctime, u.id AS user_id FROM artefact a JOIN usr u ON u.id = a.owner
WHERE a.ctime < u.ctime ORDER BY a.ctime DESC;
There doesn't seem to be any obvious reason for this, what I've checked so far on a big database:
1. Is it only an old problem? No. The problem exists for old artefacts / users (made in 2008) and new artefacts / people (made in 2020)
2) Are the artefacts of only one type? No. The offending artefacts are of many different artefact types.
3) Are the users all using the same auth method? No. The people have different auth methods, both internal and external.
4) Are they in the same institution? No. They are in a variety of institutions
5) Are the difference between artefact.ctime and usr.ctime small (race condition)? No. The gap noticed varies from 1sec to almost 1 decade (3561 days)
So my conclusion is that there is something updating the usr.ctime field
after a user has been created. That shouldn't be happening
** Affects: mahara
Importance: High
Status: New
** Changed in: mahara
Importance: Undecided => High
** Changed in: mahara
Milestone: None => 21.04.0
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1906723
Title:
Artefacts are created before the author is created according to their
ctime
Status in Mahara:
New
Bug description:
Some how it is possible for a usr.ctime value to be newer than an
artefact.ctime value when the artefact.owner = usr.id
To check this out do the following:
SELECT a.id AS artefact_id, a.ctime AS artefact_ctime, u.ctime AS
user_ctime, u.id AS user_id FROM artefact a JOIN usr u ON u.id =
a.owner WHERE a.ctime < u.ctime ORDER BY a.ctime DESC;
There doesn't seem to be any obvious reason for this, what I've checked so far on a big database:
1. Is it only an old problem? No. The problem exists for old artefacts / users (made in 2008) and new artefacts / people (made in 2020)
2) Are the artefacts of only one type? No. The offending artefacts are of many different artefact types.
3) Are the users all using the same auth method? No. The people have different auth methods, both internal and external.
4) Are they in the same institution? No. They are in a variety of institutions
5) Are the difference between artefact.ctime and usr.ctime small (race condition)? No. The gap noticed varies from 1sec to almost 1 decade (3561 days)
So my conclusion is that there is something updating the usr.ctime
field after a user has been created. That shouldn't be happening
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1906723/+subscriptions
Follow ups