Operational Defect Database

BugZero found this defect 19 days ago.

MongoDB | 2657701

Increased insert batch size reduces performance in batch inserts with errors

Last update date:

4/30/2024

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

No fixed releases provided.

Description:

Info

When we do batch inserts, we do a batch insert until we hit an error, then if we do we insert each document in the batch one by one, which is slow. In the presence of errors (e.g. an insert that would violate unique index constraints), then, the larger the batch size the more documents which will have to be written one at a time. And also the more work which will have to be re-done. We could alleviate this somewhat with a more sophisticated strategy for error handling – e.g. if we got an error during a batch, we could first retry a batch with all the documents which didn't fail, then try a batch with all the documents after the failed document.

Top User Comments


Steps to Reproduce


Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

Needs Scheduling

Learn More

Search:

...