DTSPB-5162 change search size to 100 and adding pagination and lots of refactoring#3693
DTSPB-5162 change search size to 100 and adding pagination and lots of refactoring#3693
Conversation
CCD diff reportNo change |
CCD diff reportNo change |
CCD diff reportNo change |
CCD diff reportNo change |
CCD diff reportNo change |
| pageResults = runQuery(CAVEAT, jsonQuery).getCaveats(); | ||
| allResults.addAll(pageResults); | ||
| from += dataExtractPaginationSize; | ||
| } while (!pageResults.isEmpty()); |
There was a problem hiding this comment.
This would cause an unnecessary empty-page call.
maybe we can use while (pageResults.size() == dataExtractPaginationSize);
There was a problem hiding this comment.
It seems the pagination should process the fetched cases before querying ES again, similar to the approach used in the automated notification job. Otherwise, there is a risk of an OOM exception if all 6–7k cases are fetched before processing the expiry events.
CCD diff reportNo change |
CCD diff reportNo change |
CCD diff reportNo change |
CCD diff reportNo change |
CCD diff reportNo change |
CCD diff reportNo change |
CCD diff reportNo change |
CCD diff reportNo change |
CCD diff reportNo change |
CCD diff reportNo change |
tom-saunders-cts
left a comment
There was a problem hiding this comment.
only question is whether we should have a test which confirms that we successfully loop when we have more than pageSize results (unless I've missed something here and we do?)
CCD diff reportNo change |
changed it a bit |
CCD diff reportNo change |
JIRA link (if applicable)
https://tools.hmcts.net/jira/browse/DTSPB-5162
Change description
changed query to use 100 as size with pagination instead of the ES default of 10
Does this PR introduce a breaking change? (check one with "x")