After Mongo update: Error: “updating the path … would create a conflict at …”

So after some Mongo Update in Meteor v1.8 (I think so at least), I am running into weird Mongo Errors.
What I did:

  • meteor update
  • meteor reset
  • mongorestore my whole DB

When I know run this part of code on my server I get an error:

	// unset meta attrs for next run
	try {
		await Items.update({ supplier_id: supplierId }, { $unset: { 'meta.just_updated': '', 'meta.just_reset_units': '' } }, { multi: true });
	}	catch(err) { 
		console.error('unset just_updated ERROR:', err);
	};

ERROR:

unset just_updated ERROR: { MongoError: Updating the path 'meta' would create a conflict at 'meta'
W20181015-10:49:52.762(2)? (STDERR)     at Function.create (/Users/patrick/.meteor/packages/npm-mongo/.3.1.1.94mqgq.ukc0e++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/mongodb-core/lib/error.js:43:12)
...

I then googled and found this: https://stackoverflow.com/questions/51827085/migrating-to-meteor-1-7-0-4-mongodb-updating-the-path-would-create-a-co

So I tried running db.adminCommand( { setFeatureCompatibilityVersion: "3.4" } ) in mongo shell and my code works again.
Can somebody help? What is wrong here? I am confused.

best, Patrick

Anyone? :slight_smile: This bug is quite a problem for me as I can’t update to v1.8 on production. As the Error is thrown at exactly this line it has to have something to do with the mongo call no? Of course I am running couple of packages like simpl-schema, redis-oplog, grapher and many more but I can’t see how these could have any effect on this error.
Hope someone can help!

Just bumping this again in hope for a helpful answer! :smiley: cheers guys …