Uploaded image for project: 'RAML Module Builder'
  1. RAML Module Builder
  2. RMB-684

GET query returns no records when offset value > estimated totalRecords



    • CP: sprint 94, CP: sprint 95
    • 2
    • Core: Platform
    • Q2 2020 Hot Fix #1
    • Chalmers


      Overview: Given a query that matches >= 1000 rows, it is not possible to use limit and offset together to retrieve rows after the 999th because when limit is greater than 999, the result array is always empty. This makes it impossible to retrieve paged data beyond the 999th record.

      Steps to reproduce:

      1. One way or another, find out the actual number of loans with Status "Open". In our case, it is 6023.
      2. Make this request to find out the estimated totalRecords count:

        Make a note that totalRecords: 1000.

      3. Attempt to retrieve these 6023 loans by making the 7 times, incrementing offset by 1000 for each iteration:

      Expected result:
      The first 6 requests return 1000 loans each. The 7th request returns 23 loan objects.

      Actual result:
      The first request returns 1000. The subsequent requests return [] loans.

      Additional information:
      The same behaviour can be observed in the bugfest tenant as well.

      If the offset parameter > than totalRecords, no records are returned. This can be demonstrated by the following steps:

      1. Make the following request:

      This should return loans 1000 loans, but actually returns [] – ie no loans past totalRecords.

      1. Now change the offset to be < totalRecords:

      After the last request, we might expect this to return 100 loans, stopping at the totalRecords. However, this actually returns 200 loans – ie the correct result, and 100 loans past the totalRecords.

      This issue has also been observed in Inventory, see https://issues.folio.org/browse/CHAL-294

      TestRail: Results


          Issue Links



                julianladisch Julian Ladisch
                ttolstoy Theodor Tolstoy
                0 Vote for this issue
                8 Start watching this issue



                  TestRail: Runs

                    TestRail: Cases