[FOLIO-1836] Unexpected totalRecords number when using "limit" parameter Created: 01/Mar/19  Updated: 26/Jun/20  Resolved: 26/Jun/20

Status: Closed
Project: FOLIO
Components: None
Affects versions: None
Fix versions: None

Type: Bug Priority: P3
Reporter: Nassib Nassar Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Sprint:
Development Team: Core: Platform

 Description   

There may be a bug or unexpected result when retrieving loans using a range of values for the "limit" parameter.

Test code:
https://github.com/nassibnassar/folio-loan-test

Data:
The tests were run using the performance test data set.

Test output:

folio-loan-test$ go run testloans.go 10000 | tail
      "createdDate" : "2018-12-20T05:05:59.392+0000",
      "createdByUserId" : "0f8c723d-1791-4b98-9a48-fc4a54aebc91",
      "updatedDate" : "2018-12-20T05:05:59.392+0000",
      "updatedByUserId" : "0f8c723d-1791-4b98-9a48-fc4a54aebc91"
    }
  } ],
  "totalRecords" : 71070
}
URL: http://localhost:9130/loan-storage/loans?limit=10000&offset=0
Status code: 200 OK
folio-loan-test$ go run testloans.go 50000 | tail

URL: http://localhost:9130/loan-storage/loans?limit=50000&offset=0
Status code: 200 OK
folio-loan-test$ go run testloans.go 100000 | tail
GC overhead limit exceeded
URL: http://localhost:9130/loan-storage/loans?limit=100000&offset=0
Status code: 500 Internal Server Error

The middle test may be of interest because it returned status code 200 but appeared to return no records.



 Comments   
Comment by Julian Ladisch [ 26/Jun/20 ]

The bug report is about a dataset where less than 50000 records exist and "totalRecords" : 71070 is returned.

This is as documented because totalRecords is an estimation. For details see https://github.com/folio-org/raml-module-builder#estimated-totalrecords

See also related issues:
UXPROD-2369 Closed
RMB-578 Blocked
RMB-579 Closed
UXPROD-2623 Closed

Generated at Thu Feb 08 23:16:15 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.