Export of "Package" record with 9923 "Titles" fails

Description

Overview: Export of "Package" record with number of "Titles" between 9900 and 10000 is failing with error.
Steps to Reproduce:

  1. Log into Snapshot FOLIO environment as User with the following permissions:
    Export manager: All
    eHoldings: Can view providers, packages, titles detail records
    Notes: Can view a note
    Agreements: Search & view agreements

  2. Go to the "Package" records: "/eholdings/packages/125531-2631932".

  3. Apply the filter to "Titles" by name "Africa".
    Actual result: Records found = 9923 under "Titles" accordion.

  4. Click on the "Actions">>"Export package (CSV)">>"Export".

  5. Go to "Export manager" app and wait for the export to be complete.

Expected Results: The export job is finished successfully.
Actual Results: The export job failed with error: "Expected results set exceeds maximum of 10000; please decrease size/offset values to request results set less than maximum.\"
Additional Information:
1) The export job fails with that error only when the number of "Titles" in exported "Package" records is between 9900 and 10000.
2) Full text of the error message:
"[400 Bad Request] during [GET] to http://eholdings/packages/125531-2631932/resources?searchfield=title&filter%5Bname%5D=africa&sort=name&page=100&count=100&include=accessType KbEbscoClient#getResourcesByPackageId(String,Map): [{ "errors" : [ { "title" : "Invalid RMAPI response Code = 400 Message = Bad Request Body = [

{\"code\":\"1006\",\"message\":\"Expected results set exceeds maximum of 10000; please decrease size/offset values to request results set less than maximum.\"}

]" } ], "jsonapi" : { "version" : "1.0" } }] (BadRequest)"
3) URL: https://folio-snapshot.dev.folio.org/eholdings/packages/125531-2631932?filterTitles=africa&searchfield=title 
Note:  suggests requesting the last page with 99 records, instead of 100.
Interested parties:  
Possible solution: Decrement count when page*count = 10_000 to have page*count = 9_999
 

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

Attachments

8

blocks

Checklist

hide

TestRail: Results

Activity

Show:

Valery_Pilko December 1, 2022 at 8:43 AM

Verified at Nolana BF environment - works as expected.
See attached screenshots:

cc:  

Oleksii Petrenko December 1, 2022 at 12:31 AM

Deployed to Nolana bf. Please proceed with verification

Valery_Pilko November 28, 2022 at 8:32 AM

Verified at Snapshot environment - works as expected.
See attached screenshots:

See the exported ".csv" file:

Viacheslav Kolesnyk November 25, 2022 at 9:08 PM

Verified on a rancher env (9978 titles)

Viacheslav Kolesnyk November 10, 2022 at 2:14 PM

How should we proceed with jobs for exporting packages that have >=10_000 titles?

Should we leave them as is (failing when trying to get titles over 10_000), or just export 9_999 titles (max possible)

Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Spitfire

Fix versions

Release

Nolana (R3 2022) Bug Fix

RCA Group

Third party component integration

Affected releases

Nolana (R3 2022)

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created November 10, 2022 at 12:44 PM
Updated January 5, 2023 at 11:13 PM
Resolved November 29, 2022 at 11:05 AM
TestRail: Cases
TestRail: Runs