By default, MongoDB handles updating pending data by removing the previous call
data and inserting the new data after that. Sometimes this results in data
"flashing".
This PR adds support for replacing pending data in one transaction. Notice
that this feature requires a special deployment of MongoDB (with replication)
and so it cannot be turned on by default.
Testing strategy
Deploy a MongoDB database with replication support.
Run an indexer that inserts data at every block, for example the ETH
transfers example in the repo. Use the new --replace-data-inside-transaction=true
flag.
Summary
By default, MongoDB handles updating pending data by removing the previous call data and inserting the new data after that. Sometimes this results in data "flashing".
This PR adds support for replacing pending data in one transaction. Notice that this feature requires a special deployment of MongoDB (with replication) and so it cannot be turned on by default.
Testing strategy
--replace-data-inside-transaction=true
flag.