A bare empty map is written to the settings collection by addLeadershipSettingsOp which is unsupported by the multi-env txn layer that automatically adds the env-uuid field and env UUID prefix to the _id field. This leaves means the document is written out without appropriate environment information
addLeadershipSettingsOp should be updated to using bson.D/M.
In addition the multi-env txn layer should error out when it sees a document expressed with an unsupported type.
This issue also exposed a way which the addEnvUUIDToEntityCollection upgrade helper can be improved. It should not attempt to add an env-uuid prefix to the _id if it's already there. This was seen and was causing upgrade failures which investigating another issue.
A bare empty map is written to the settings collection by addLeadershipSe ttingsOp which is unsupported by the multi-env txn layer that automatically adds the env-uuid field and env UUID prefix to the _id field. This leaves means the document is written out without appropriate environment information
addLeadershipSe ttingsOp should be updated to using bson.D/M.
In addition the multi-env txn layer should error out when it sees a document expressed with an unsupported type.
This issue also exposed a way which the addEnvUUIDToEnt ityCollection upgrade helper can be improved. It should not attempt to add an env-uuid prefix to the _id if it's already there. This was seen and was causing upgrade failures which investigating another issue.