slides/mongodb/retry-retrying-reads.xml
Retrying Reads
25/34
Retryable Errors
Retrying Writes
  • • Queries that return a single document are always safe to retry
  • • Short-running queries that return a single batch of documents (i.e. will not leave behind a cursor) may be safe to retry
  • • Drivers will aim to retry most read commands in MongoDB 4.2:
  • • Requires server functionality to detect dropped sockets and abort operations
  • • getMore cannot be retried, since cursor iteration is forward only