[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: |
|
||||||||
| 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: |
| 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: |
| Comment by Githook User [ 20/May/17 ] |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: |
| 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: |
| 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. |