[COMPASS-6211] Investigate changes in PM-3038: Mongos communicates retryable error labels from shards to drivers Created: 17/Oct/22  Updated: 09/Dec/22  Resolved: 07/Dec/22

Status: Closed
Project: Compass
Component/s: None
Affects Version/s: None
Fix Version/s: No version

Type: Investigation Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Rhys Howell
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
Epic Link: COMPASS-5985
Documentation Changes: Not Needed
Sprint: Iteration Quahog

 Description   
Original Downstream Change Summary

This is a dependency for DRIVERS-555 to be effective.

Description of Linked Ticket

Epic Summary

Summary

Expose RetryableWriteError and NoWritesPerformed error labels from mongos to drivers.

Motivation

Since MongoDB 4.4 (SERVER-41245), drivers rely on the RetryableWriteError label to indicate whether or not an error response from the server warrants a retry. Current versions of mongos only return the RetryableWriteError label when the mongos itself is shutting down and not when there’s been a retryable error from one of the shards. Note that mongos itself retries on retryable errors from the shards up to three (3) times.

The work from DRIVERS-555 (Client Side Operations Timeout) enables applications to set a deadline until which the driver should continue to retry. This may mean an application is willing to retry longer than the duration of the retries performed by mongos. Having mongos propagate back a RetryableWriteError label when it gives up retrying can signal to drivers whether they want to continue retrying themselves.

Moreover, drivers also rely on the NoWritesPerformed error label (SERVER-66479) to decide upon retry which error response to expose to the application. Current versions of mongos never return the NoWritesPerformed error label.

Documentation

Scope Document
Technical Design Document



 Comments   
Comment by Rhys Howell [ 07/Dec/22 ]

I don't think we need to do anything here for mongosh. We surface the errors the server/driver returns, so any new label from the server or driver will show up. If we want to do work in improving error reporting we could look at MONGOSH-1198 

Generated at Wed Feb 07 22:42:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.