[SERVER-60976] extend WriteConflictException construction to accept context string Created: 25/Oct/21  Updated: 29/Oct/23  Resolved: 26/Oct/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.2.0

Type: Improvement Priority: Major - P3
Reporter: Benety Goh Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-59657 Add ErrorExtraInfo for the WriteConfl... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2021-11-01
Participants:

 Description   

A WriteConflictException currently contains a generic message. Generally, this is acceptable because a WriteConflictException is used mostly within a WCE retry loop. In certain cases, the caller may want to include some contextual information in a string format. Extending the WriteConflictException constructor to accept a context string (which will be passed to DBException::addContext()) would be a convenient way to capture this additional information.



 Comments   
Comment by Githook User [ 26/Oct/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-60976 WriteConflictException accepts context at creation
Branch: master
https://github.com/mongodb/mongo/commit/1cf0b1f960473c325f41a004a787560e71cd84b1

Comment by Benety Goh [ 25/Oct/21 ]

This is an alternative solution to the underlying problem that SERVER-59657 is trying to address.

Generated at Thu Feb 08 05:51:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.