mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-25 19:59:54 -05:00
### Does this PR have any customer impact? Unblock customer using mongoimport with 8.0 cluster ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) Bugfix ### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes) No ### Are you introducing any new config? If yes, do you have tests with and without them being set? No ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) N/A ### Description In the [ticket](https://portal.microsofticm.com/imp/v5/incidents/details/627206133/summary), cx reported an error while using mongoimport with 8.0 cluster There might be typo in cx's statement, as we have ignored startTransaction in our code. However, the mongoimport does fail with 8.0 cluster, with error saying "Failed: (UnknownBsonField) BSON field 'insert.bypassEmptyTsReplacement' is an unknown field"  bypassEmptyTsReplacement was [introduced in mongo 5.0](https://www.mongodb.com/docs/manual/release-notes/5.0/#:~:text=SERVER%2D88750%20Add%20%22bypassEmptyTsReplacement%22%20param%20to%20insert%2C%20update%2C%20findAndModify%2C%20and%20bulkWrite). It seems mongoimport add `bypassEmptyTsReplacement` field for 8.0 clusters, which leads to insertion failure with vCore 8.0 version but not on 7.0 This PR adds bypassEmptyTsReplacement to ignore field to unblock cx from using mongoimport ---- #### AI description (iteration 1) #### PR Classification This pull request implements a new feature to support mongoimport in mongo8.0. #### PR Summary The update adds the "bypassEmptyTsReplacement" field to the list of ignored fields in the `oss/pg_documentdb/src/commands/commands_common.c` file, ensuring compatibility for insert, update, findAndModify, and bulkWrite commands when using mongoimport. - `oss/pg_documentdb/src/commands/commands_common.c`: Inserted "bypassEmptyTsReplacement" into the ignore list for relevant commands. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->