mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-21 23:13:05 +00:00
Fix failine reindexing issue
This commit is contained in:
parent
cb6e42941a
commit
a9a830a93a
@ -451,11 +451,11 @@ public abstract class EntityRepository<T extends EntityInterface> {
|
|||||||
|
|
||||||
String beforeCursor;
|
String beforeCursor;
|
||||||
String afterCursor = null;
|
String afterCursor = null;
|
||||||
beforeCursor = after == null ? null : entities.get(0).getName();
|
beforeCursor = after == null ? null : JsonUtils.readValue(jsons.get(0), entityClass).getName();
|
||||||
if (entities.size() > limitParam) { // If extra result exists, then next page exists - return after cursor
|
if (jsons.size() > limitParam) {
|
||||||
T lastReadEntity = JsonUtils.readValue(jsons.get(limitParam), entityClass);
|
T lastReadEntity = JsonUtils.readValue(jsons.get(limitParam), entityClass);
|
||||||
entities.remove(limitParam);
|
entities.remove(lastReadEntity.getId());
|
||||||
afterCursor = entities.get(limitParam - 1).getName();
|
afterCursor = JsonUtils.readValue(jsons.get(limitParam - 1), entityClass).getName();
|
||||||
errors.forEach((key, value) -> entities.remove(key));
|
errors.forEach((key, value) -> entities.remove(key));
|
||||||
// Remove the Last Json Entry if present in error, since the read was actually just till limitParam , and if
|
// Remove the Last Json Entry if present in error, since the read was actually just till limitParam , and if
|
||||||
// error
|
// error
|
||||||
|
Loading…
x
Reference in New Issue
Block a user