Skip to content

Commit 4595c4d

Browse files
authored
fix(ingestion): reduce relationship insertion batch size from 1000 to 100 (#563)
1 parent 442c6f5 commit 4595c4d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/EbeanLocalRelationshipWriterDAO.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ private static class CommonColumnName {
4343
private static final String LAST_MODIFIED_ON = "lastmodifiedon";
4444
private static final String LAST_MODIFIED_BY = "lastmodifiedby";
4545
}
46-
private static final int INSERT_BATCH_SIZE = 1000;
46+
private static final int INSERT_BATCH_SIZE = 100;
4747
private static final int DELETE_BATCH_SIZE = 10000; // Process deletes in batches of 10,000 rows
4848
private static final int MAX_BATCHES = 1000; // Maximum number of batches to process
4949
private static final String LIMIT = " LIMIT ";
@@ -185,7 +185,7 @@ private <ASPECT extends RecordTemplate, RELATIONSHIP extends RecordTemplate> voi
185185

186186
long now = Instant.now().toEpochMilli();
187187

188-
// Insert in batches with 1000 values per insert statement
188+
// Insert in batches with 100 values per insert statement
189189
int numBatches = (relationshipGroup.size() + INSERT_BATCH_SIZE - 1) / INSERT_BATCH_SIZE;
190190
for (int i = 0; i < numBatches; i++) {
191191
int numRelationships = Math.min(INSERT_BATCH_SIZE, relationshipGroup.size() - i * INSERT_BATCH_SIZE);

0 commit comments

Comments
 (0)