[SERVER-75637] Use 'retryWrites' when directly writing to the CSRS in `merge_all_chunks_on_shard.js` Created: 04/Apr/23  Updated: 29/Oct/23  Resolved: 14/Apr/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.0.0-rc0, 7.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Pierlauro Sciarelli Assignee: Allison Easton
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Assigned Teams:
Sharding EMEA
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.0
Sprint: Sharding EMEA 2023-04-17
Participants:
Linked BF Score: 30

 Description   

An updateMany is performed to override the onCurrentShardSince field on chunk documents.

When the config server steps down while serving the request the client could get a write concern error as the following:

WriteConcernError({
    "code" : 6,
    "codeName" : "HostUnreachable",
    "errmsg" : "operation was interrupted; Error details: { writeConcern: { w: \"majority\", wtimeout: 0, provenance: \"implicitDefault\" } } at config",
    "errInfo" : {}
})

Changing the updateMany to happen as a part of a session with retryWrites:true would solve the issue. (Solution similar the one implemented for SERVER-66077).



 Comments   
Comment by Githook User [ 18/Apr/23 ]

Author:

{'name': 'Allison Easton', 'email': 'allison.easton@mongodb.com', 'username': 'allisoneaston'}

Message: SERVER-75637 Use 'retryWrites' when directly writing to the CSRS in `merge_all_chunks_on_shard.js`

(cherry picked from commit 80df62ebff5387596cce4c76b90e3c08a07ca7f6)
Branch: v7.0
https://github.com/mongodb/mongo/commit/562bf2ad2083e9be7d6c4013756b77987a4128c8

Comment by Githook User [ 13/Apr/23 ]

Author:

{'name': 'Allison Easton', 'email': 'allison.easton@mongodb.com', 'username': 'allisoneaston'}

Message: SERVER-75637 Use 'retryWrites' when directly writing to the CSRS in `merge_all_chunks_on_shard.js`
Branch: master
https://github.com/mongodb/mongo/commit/80df62ebff5387596cce4c76b90e3c08a07ca7f6

Generated at Thu Feb 08 06:30:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.