fix: Maximum call stack size exceeded
Signed-off-by: thinkmo <tryit0714@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/catalog-backend-module-incremental-ingestion': patch
|
||||
---
|
||||
|
||||
Fix plugin/incremental-ingestion 'Maximum call stack size exceeded' error when ingest large entities.
|
||||
+3
-5
@@ -336,11 +336,9 @@ export class IncrementalIngestionDatabaseManager {
|
||||
.join('ingestions', 'ingestions.id', 'ingestion_marks.ingestion_id')
|
||||
.where('ingestions.id', previousIngestion.id);
|
||||
|
||||
removed.push(
|
||||
...stale.map(e => {
|
||||
return { entityRef: e.ref };
|
||||
}),
|
||||
);
|
||||
for (const entityRef of stale) {
|
||||
removed.push({ entityRef: entityRef.ref });
|
||||
}
|
||||
}
|
||||
|
||||
return { total, removed };
|
||||
|
||||
+3
-1
@@ -322,7 +322,9 @@ export class IncrementalIngestionEngine
|
||||
}
|
||||
}
|
||||
if (doRemoval) {
|
||||
removed.push(...result.removed);
|
||||
for (const entityRef of result.removed) {
|
||||
removed.push(entityRef);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user