I have some large collections with documents like this:
{
_id : snowflake,
field1: NumberLong
field2: NumberLong
field3: NumberLong
field4: NumberLong,
value1: string
value2: double
}
This collection has 3 indexes:
id on the _id field
indexA_unique has {field1:1, field2:1, field3:1, field4:1}
indexB has {field1:1, field2:1, field3:1, field4:1, value1:1, value2:1} This index is also unique.
I am trying to read the collection in batches (using DBCursor). The query includes all fields except _id as a “fields projection”. If after reading n records, someone inserts a record that will fall in position n-m according to indexB (which I assume will be used by the DB for this query), could the next batch of records include a previously seen result?