|
So - plot twist. The 'allowImplicitCollectionCreation: false' flag we now set on $merge does not actually prevent the collection from being created. It just prevents the shard from doing it implicitly itself - it causes the config server to drive the collection create. This means that my workaround in these tests doesn't work. Fortunately, nicholas.zolnierz, janna.golden and esha.maharishi and I discussed and recognized that SERVER-44252 was planned to remove the flag for allowImplicitCollectionCreation. Instead of removing it, we plan to let that ticket proceed and take away any callers of allowImplicitCollectionCreation: false except for $merge. Once we do that, we can change what the flag means to better suit our purpose: under no circumstances is the collection to be created.
So for now I'm abandoning the code review I sent anton.korshunov and nicholas.zolnierz and I'm going to mark this as "depends on" SERVER-44252. This means that we won't be able to fix the BFs on the v4.2 branch, so I'll eventually mark them as trivial once we fix them on master.
|