mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-01 02:56:10 +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());
|
||||
} catch (Exception e) {
|
||||
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 =
|
||||
new IndexingError()
|
||||
.withErrorSource(READER)
|
||||
.withSubmittedCount(batchSize)
|
||||
.withSubmittedCount(submittedRecords)
|
||||
.withSuccessCount(0)
|
||||
.withFailedCount(batchSize)
|
||||
.withFailedCount(submittedRecords)
|
||||
.withMessage(
|
||||
"Issues in Reading A Batch For Entities. No Relationship Issue , Json Processing or DB issue.")
|
||||
.withLastFailedCursor(lastFailedCursor)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user