documentdb: BSON field 'insert.bypassEmptyTsReplacement' is an unknown field
Purpose of the feature.
Current versions of mongoexport/mongoimport and mongodump/mongorestore set bypassEmptyTsReplacement parameter that DocumentDB does not support. That prevents them from working.
Describe the solution you’d like
This parameter is implemented. It does not look like this parameter can be safely ignored.
Describe alternatives you’ve considered
I considered removing that parameter on the FerretDB side, but it is not safe.
Additional context
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 21 (16 by maintainers)
That’s impossible until DocumentDB implements OpLog or until it implements Change Streams, and we emulate OpLog using them.
I don’t know; we can’t control the clients. All I know is that the current version of the import/export tools sets that field explicitly.
GUG is also fine.
But I think the best approach is to do nothing until it becomes a more realistic problem with Change Streams / OpLog support. Or until someone else reports this problem.
thank you @chilagrow for providing detail context. i think replacing zero timestamp with current timestamp is wrong behavior in mongoDB, since it shouldn’t be modifying original customer data in insert/update which is out of customer expectation. if customer want to update the data in insert/update they should explicitly assign the new value in insert/update. This bypassEmptyTsReplacement parameter seems to be an internal parameter support in mongoDB as a workaround solution. Since documentDB doesn’t have this issue(replacing zero timestamp), we don’t plan to support it. Also when we try to repro this issue in mongoimport/mongoexport/mongodump/mongorestore tool with timestamp data in collection, we couldn’t repro this issue with old version or latest version of tool.
We’re recently optimizing insert/update while trying to implement bulkWrite, will investigate this along with that and see how to support this param.