[Koha-bugs] [Bug 10454] Duplicate card numbers may be generated

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat Jun 22 19:30:53 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10454

--- Comment #7 from M. Tompsett <mtompset at hotmail.com> ---
Created attachment 19196
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19196&action=edit
Bug 10454 - Duplicate card numbers may be generated

Previously, there was a gap in time between the insertion of the
card number into borrowers and the generation. This gap meant that
the same card number could be calculated by two different processes
resulting in two different members being added with the same card
number.

By serializing the cardnumber requests, at worst we may skip a
cardnumber, rather than duplicate one. No locking required,
because the INSERT into cardnumber_sequence is atomic!

The reason no duplicates happen is because the sequence of
cardnumbers is calculated from the previous one, and recalculating
would generate exactly the same value. So even if two processes
are calculating the same cardnumber for a given UID record, it
will result in the same value.

Skips can be generated. Clicking refresh while entering a patron,
for example, will increment the auto generated number multiple
times.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list