Bug #989
closed
Two users starting sessions at about the same time causes sessions of the same name in database
Added by Anchi Cheng about 14 years ago.
Updated about 14 years ago.
Affected Version:
Appion/Leginon 2.0.2
Description
Found a few examples on cronus4 see AMI group bug #988. What can we do to prevent this?
- Status changed from Assigned to In Code Review
- Assignee changed from Jim Pulokas to Anchi Cheng
r14992 adds a session name reservation system to the setup wizard. A new table SessionReservationData will keep track of reserved session names. When a session name is created or changed in the wizard, the name must be reserved. This reservation is only canceled if the name is changed during the setup wizard, or if the setup wizard is completely canceled with the "cancel" button.
potential issues:
There is still a very short time (probably less than one second) between the check for existing reservation and the insert of the new reservation. During that time, two concurrent Leginons could reserve the same name, but this is much less than the several seconds/minutes window that was previously allowed. It is extrememely unlikely to ever happen.
If the SetupWizard is killed by control-C, then the existing reservation would be left in the database, but this is not critical. It just means that that name can never be used.
The SessionReservationData table will grow indefinitely, so we will eventually want to think about a clean up procedure for old reservations. It will be such a small table anyway, so probably not critical.
- Status changed from In Code Review to In Test
In r15035 , Jim canceled the reservation made when returning to an existing session.
- Status changed from In Test to In Code Review
- Assignee changed from Anchi Cheng to Jim Pulokas
committed the revisions for this fix to branches:
myami-2.1: r15044 and r15046 where r15044 is the trunk revision diff for r14992 and r15046 is a modified revision diff of r15035 since there are other changes in the trunk in between r14992 and r15035.
myami-2.0: r15048 is a merge from myami-2.1 of r15044 and r15046.
Both are tested with cronus4 database.
- Status changed from In Code Review to Closed
Jim code-reviewed with me. These were tested on spirit1
Also available in: Atom
PDF