-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Integration
Because of mongod/mongot's eventual consistency, to get meaningful results from our search queries, resmoke will need to wait for mongot to have fully replicated data from the $changeStream before returning results
Our current approach requires the dev to create a collection, insert documents, then create a search index then run a search query. Breaking this order will break testing because we use the status of the search index (READY) generated from $listSearchIndexes to know that the collection data has been fully replicated and indexed. If we update documents or add documents after index creation, the status of $listSearchIndexes doesn't guarantee anything about the status of data replication and queries could return incorrect results.
For this, we will need a shell helper that compares opTimes from mongod and mongot. This will be very important for the reasons above but also for secondary read passthroughs, eg passthroughs that set readPref to secondary and run given tests and ensure documents returned from queries are the same.