In BF-26686 we see an inconsistent multikey state in the in-memory catalog.
From the comments under BF-26686 we witness two (presumably) concurrent inserts occur:
{ “_id” : ObjectId(“633a9b678c7aa637fbd079a6"), “a” : [ { “b” : [ 2 ] } ] } { “_id” : ObjectId(“633a9b678c7aa637fbd079ac”), “a” : { “b” : [ -1, -2 ] } }
Notably, the first insert will set the multikey path for a and b while the second document will only set b. Ultimately, we only have b as a multikey path (on disk).
We potentially have a situation where writers could be obtaining copies of the collection metadata before it is marked as multikey and the second writer could overwrite the other writer’s collection metadata write.
This ticket would include writing a detailed c++ test to verify the findings and potential bug.