[Koha-bugs] [Bug 34470] New: Real Time Holds Queue - make random numbers play nice with forked processes

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Aug 3 15:45:49 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34470

            Bug ID: 34470
           Summary: Real Time Holds Queue - make random numbers play nice
                    with forked processes
 Change sponsored?: ---
           Product: Koha
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P5 - low
         Component: Architecture, internals, and plumbing
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: emily.lamancusa at montgomerycountymd.gov
        QA Contact: testopia at bugs.koha-community.org

In our system, we're noticing that the real-time holds queue is consistently
sending a disproportionate number of holds to the same branches, although
RandomizeHoldsQueueWeight is set to distribute holds randomly. The holds queue
cron job often produced a "bubble" where one or two libraries would have a much
longer holds queue than the others, but the "bubble" would move around between
different branches from run to run. Since turning on the real-time holds queue,
the "bubble" has stayed on the same two libraries for the full week that the
real-time holds queue has been running. Other library systems have reported
imbalanced distributions as well.

Adding some logging revealed that the branches were being "randomized" to an
identical order each time the holds queue is updated! This is consistent with
the evidence that the same branches are always being assigned the most and
second-most holds (respectively) in our production server. I was also able to
replicate that same behavior on master, 22.11.x, and 22.05.x.

Instructions to replicate are coming in the first comment, along with a patch
to add the logging.

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


More information about the Koha-bugs mailing list