Skip to content

Commit

Permalink
Fix migration pagination logic (#3816)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
kbirk and github-actions[bot] authored Jun 10, 2024
1 parent f5cc32d commit 0627800
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ Pair<Integer, Integer> migrateFromEsToPg(final ElasticsearchService elasticServi
}
}

if (Objects.equals(lastId, lastPagesLastId) || assets.size() < PAGE_SIZE) {
if (Objects.equals(lastId, lastPagesLastId)
|| resp.hits().hits().size() < PAGE_SIZE) {
break;
}

Expand Down

0 comments on commit 0627800

Please sign in to comment.