Uploaded image for project: 'UX Product'
  1. UX Product
  2. UXPROD-3515

Concurrent Check-outs via Self-check do not check for patron item limits



    • New Feature
    • Status: Draft (View Workflow)
    • P2
    • Resolution: Unresolved
    • None
    • None
    • None
    • Not Scheduled
    • Volaris
    • 0
    • R4
    • R3


      Possible bug in circulation: https://github.com/folio-org/mod-circulation/blob/v22.1.3/src/main/java/org/folio/circulation/resources/CheckOutByBarcodeResource.java#L125-L140

      The selfcheck machine connects to FOLIO through SIP2 and checks out multiple items to the same patron at the same time (each checkout message does not wait for the processing result, and multiple checkout messages are sent at the same time).
      It might exceed the maximum number of items that the patron is allowed to loan. For example, the maximum number of books a patron can checkout is 15 items, and the self-check machine sends 20 checkout requests almost simultaneously, it turns out that all the 20 books are successfully checked out.

      It is normal to valid the circulation rules when checkout item one by one in CheckOutByBarcodeResource.java.
      Once the concurrency occurs, folio will only check the circulation rules of current checkout, instead of checking all the concurrent checkout, which may exceed the limit.

      This is caused by a race condition: After refuseWhenItemLimitIsReached is called (line 125) many other operations take place before createLoan is called (line 140): https://github.com/folio-org/mod-circulation/blob/v22.1.3/src/main/java/org/folio/circulation/resources/CheckOutByBarcodeResource.java#L125-L140

      TestRail: Results


          Issue Links



                Unassigned Unassigned
                cmalmbor Cheryl Malmborg
                0 Vote for this issue
                13 Start watching this issue



                  TestRail: Runs

                    TestRail: Cases