digitalbazaar / bedrock-ledger-storage-mongodb

A storage subsystem for Bedrock ledger.
Other
5 stars 3 forks source link

Implement util.chunkDocuments. #45

Closed mattcollier closed 5 years ago

mattcollier commented 5 years ago

The MongoDB insertMany API has been used here without first ensuring that the sum total of all the documents does not exceed the MongoDB 16MB document size limit.

An excessively large document can occur on a ledger with a very large volume of small operations or a ledger with large operations (Continuity consensus caps operations sizes at 256K).

Here's some research that went into the current implementation: https://gist.github.com/mattcollier/b0e4d5fefa3a5640b329d9a73c02cc70