doStreamGetQuery returns only 100 records when limit>100

Description

See that reports this bug for /instance-bulk/ids and /users

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

Attachments

1

Checklist

hide

TestRail: Results

Activity

Show:

Kruthi Vuppala October 9, 2020 at 7:15 PM

Hello , is there anything that is blocking the release of RMB with this fix?

Magda Zacharska October 8, 2020 at 1:05 PM

this fix will need to be a part of Q3 2020 release.

Ian Walls October 6, 2020 at 2:08 PM

My sincere apologies, it's been a while since I've read Java. Glad that it's not as pervasive a problem as that.

Julian Ladisch October 6, 2020 at 1:36 PM

doStreamGetQuery is NOT used by ResultInfo.setTotalRecords.

This is the code taken from raml-module-builder/domain-models-api-interfaces/target/generated-sources/raml-jaxrs/org/folio/rest/jaxrs/model/ResultInfo.java (use mvn compile to generate the code):

doStreamGetQuery calls setTotalRecords, setTotalRecords does NOT call doStreamGetQuery.

PostgresClient's get and doGet methods use processResults that calls setTotalRecords: https://github.com/folio-org/raml-module-builder/blob/v31.1.1/domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java#L2600 They do not call doStreamGetQuery.

Ian Walls October 5, 2020 at 2:18 PM

doStreamGetQuery is used in setTotalRecords in RMB (https://github.com/search?q=org%3Afolio-org+doStreamGetQuery&type=code), which is used in over 125 places in the code on GitHub (https://github.com/search?q=org%3Afolio-org+setTotalRecords&type=code). One of those places is mod-calendar, where it looks like it's possible that if there were over 100 events or exceptions, they would not all be returned and thus the due dates of materials COULD be off by a number of days. This is getting pretty out there in terms of "what if", but it shows that this bug could have implications on the data in a production system.

Done

Details

Assignee

Reporter

Priority

Sprint

Development Team

Core: Platform

Fix versions

Release

Q2 2020 Hot Fix #4

Affected Institution

Chalmers
MO State
Simmons
TAMU

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs
Created September 23, 2020 at 3:14 PM
Updated January 18, 2021 at 10:59 PM
Resolved October 12, 2020 at 1:55 PM
TestRail: Cases
TestRail: Runs