We are seeing some intermittent failures in both the app and in workers.
What is happening is that updateOne takes either an array or an object. If it's an array, it is supposed to be a filter - so ['match' => 'value']. If it's an object, it should be an ObjectId.
However - in Tripod, our _id fields are arrays - so validation on the updateOne function is ok - but it won't match. By changing it to be ['_id' => $generatedRow['_id']] we make sure the filter works as expected.
The update to MongoSearchProvider is where we are doing an insert where we should be using an upsert.
We are seeing some intermittent failures in both the app and in workers.
What is happening is that
updateOne
takes either an array or an object. If it's an array, it is supposed to be a filter - so['match' => 'value']
. If it's an object, it should be an ObjectId.However - in Tripod, our
_id
fields are arrays - so validation on the updateOne function is ok - but it won't match. By changing it to be['_id' => $generatedRow['_id']]
we make sure the filter works as expected.The update to MongoSearchProvider is where we are doing an insert where we should be using an upsert.