I receive a code 75 error (“A badly formatted packet was sent to the server. Please report this in a bug”)
So, I am sure, it comes from the upsert option that seems to be incompatible with the remove.
Is that a bug ? Is there a workaround different than
It looks like there may be a bug in the client or server. As @ingenthr mentioned, it would be great to get some information about your environment such that we can try to reproduce it locally.
Looking at what you are performing, I think the semantics are clear and unambiguous, so it should work. There isn’t any conflict between the remove and the upsert mode like there might be with a remove against a subdocument in insertion mode.