mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-12 08:52:38 +00:00
- Fix Search Index App Json Processing Exception
This commit is contained in:
parent
39eb9299e4
commit
97289bafce
@ -98,12 +98,26 @@ public class PaginatedEntitiesSource implements Source<ResultList<? extends Enti
|
|||||||
updateStats(result.getData().size(), result.getErrors().size());
|
updateStats(result.getData().size(), result.getErrors().size());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
lastFailedCursor = this.cursor;
|
lastFailedCursor = this.cursor;
|
||||||
|
int remainingRecords =
|
||||||
|
stats.getTotalRecords() - stats.getFailedRecords() - stats.getSuccessRecords();
|
||||||
|
int submittedRecords;
|
||||||
|
if (remainingRecords - batchSize <= 0) {
|
||||||
|
submittedRecords = remainingRecords;
|
||||||
|
updateStats(0, remainingRecords);
|
||||||
|
this.cursor = null;
|
||||||
|
this.isDone = true;
|
||||||
|
} else {
|
||||||
|
submittedRecords = batchSize;
|
||||||
|
String decodedCursor = RestUtil.decodeCursor(cursor);
|
||||||
|
this.cursor = RestUtil.encodeCursor(String.valueOf(Integer.parseInt(decodedCursor) + batchSize));
|
||||||
|
updateStats(0, batchSize);
|
||||||
|
}
|
||||||
IndexingError indexingError =
|
IndexingError indexingError =
|
||||||
new IndexingError()
|
new IndexingError()
|
||||||
.withErrorSource(READER)
|
.withErrorSource(READER)
|
||||||
.withSubmittedCount(batchSize)
|
.withSubmittedCount(submittedRecords)
|
||||||
.withSuccessCount(0)
|
.withSuccessCount(0)
|
||||||
.withFailedCount(batchSize)
|
.withFailedCount(submittedRecords)
|
||||||
.withMessage(
|
.withMessage(
|
||||||
"Issues in Reading A Batch For Entities. No Relationship Issue , Json Processing or DB issue.")
|
"Issues in Reading A Batch For Entities. No Relationship Issue , Json Processing or DB issue.")
|
||||||
.withLastFailedCursor(lastFailedCursor)
|
.withLastFailedCursor(lastFailedCursor)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user