medium severityMongoDB Atlas Search
After insert/update/delete, immediate $search queries on the collection miss/reflect old data (e.g., new doc not found, updated fields show prior values). Temporary fix: add 1s sleep. Alerts may fire for 'Index Replication Lag' or 'Mongot stopped replication'.
Root cause
Atlas Search (`mongot` process) tails MongoDB oplog/change streams asynchronously for eventual consistency, introducing lag (typically seconds). Factors: replication across shards/replicas, disk/CPU contention (e.g., pauses at 90% disk use), index size/complexity, query load. Unlike transactional B-tree indexes, search updates don't block writes.
Atlas Searchmongotreplication lageventual consistencyoplogdisk utilization