[SERVER-29233] MONGO_WRITE_CONFLICT_RETRY_LOOP_BEGIN is a macro Created: 16/May/17  Updated: 30/Oct/23  Resolved: 28/Aug/17

Status: Closed
Project: Core Server
Component/s: Concurrency
Affects Version/s: 3.5.7
Fix Version/s: 3.5.9

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

Issue Links:
Related
related to SERVER-29544 *_WRITE_CONFLICT_RETRY_* uses should ... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2017-06-19
Participants:

 Description   

db/concurrency/write_conflict_exception.h defines macros MONGO_WRITE_CONFLICT_RETRY_LOOP_BEGIN and MONGO_WRITE_CONFLICT_RETRY_LOOP_END that could much more cleanly, safely, and maintainably be a trivial function template.

It would be better to deprecate these macros and define such a function template in that header.



 Comments   
Comment by Githook User [ 08/Jun/17 ]

Author:

{u'username': u'nathan-myers-mongo', u'name': u'Nathan Myers', u'email': u'nathan.myers@10gen.com'}

Message: SERVER-29233 Sanitize MONGO_WRITE_CONFLICT_RETRY_LOOP_BEGIN/_END
Branch: master
https://github.com/mongodb/mongo/commit/b0948771201e479568dd8a8bed947d0f6166e5fb

Comment by Githook User [ 08/Jun/17 ]

Author:

{u'username': u'nathan-myers-mongo', u'name': u'Nathan Myers', u'email': u'nathan.myers@10gen.com'}

Message: SERVER-29233 Improve writeConflictRetry
Branch: master
https://github.com/mongodb/mongo/commit/87f427f7d0bdcbe8ed45f815fbad9ba4c60b6f6b

Comment by Githook User [ 20/May/17 ]

Author:

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

Message: SERVER-29233 add missing dependency
Branch: master
https://github.com/mongodb/mongo/commit/3c57867f44a38fdd9c46b9073399ca2208bada3c

Comment by Githook User [ 19/May/17 ]

Author:

{u'username': u'nathan-myers-mongo', u'name': u'Nathan Myers', u'email': u'nathan.myers@10gen.com'}

Message: SERVER-29233 Deprecate MONGO_WRITE_CONFLICT_RETRY_LOOP_BEGIN
Branch: master
https://github.com/mongodb/mongo/commit/eb1a68ef7daf9bae48506206b0a0c9f57bdae91e

Comment by Andy Schwerin [ 16/May/17 ]

It is intentional that the macro does not break on "too many retries". The function inside the loop is responsible for considering interruption/max time expiration.

Generated at Thu Feb 08 04:20:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.