[SERVER-71985] Automatically retry time series insert on DuplicateKey error Created: 09/Dec/22 Updated: 29/Oct/23 Resolved: 06/Apr/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.0.0-rc0, 6.3.2, 6.0.7, 5.0.19 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Dan Larkin-York | Assignee: | Yuhong Zhang |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | michael-preferred, time-series | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Assigned Teams: |
Storage Execution
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Backport Requested: |
v6.3, v6.0, v5.0
|
||||||||||||
| Sprint: | Execution Team 2023-03-20, Execution Team 2023-04-03, Execution Team 2023-04-17 | ||||||||||||
| Participants: | |||||||||||||
| Case: | (copied to CRM) | ||||||||||||
| Description |
|
Due to the way we generate time series bucket _id values, it's possible that some inserts to time series collection will see unexpected DuplicateKey errors. For the most part, these errors are transient and retrying the insert will succeed. Some of our users already use this workaround. We can automate it by automatically retrying the the operation internally. The only caveat is that in some degenerate cases, the retry may not succeed, or may only succeed with very low probability, so we should limit the number of retries (unlike a WriteConflict where we'll retry indefinitely). |
| Comments |
| Comment by Githook User [ 22/Jun/23 ] |
|
Author: {'name': 'Dan Larkin-York', 'email': 'dan.larkin-york@mongodb.com', 'username': 'dhly-etc'}Message: (cherry picked from commit f181b82f053bf4a167c139df976edae2dc708688) |
| Comment by Githook User [ 25/May/23 ] |
|
Author: {'name': 'Yuhong Zhang', 'email': 'yuhong.zhang@mongodb.com', 'username': 'YuhongZhang98'}Message: (cherry picked from commit f181b82f053bf4a167c139df976edae2dc708688) |
| Comment by Githook User [ 02/May/23 ] |
|
Author: {'name': 'Yuhong Zhang', 'email': 'yuhong.zhang@mongodb.com', 'username': 'YuhongZhang98'}Message: (cherry picked from commit f181b82f053bf4a167c139df976edae2dc708688) |
| Comment by Githook User [ 06/Apr/23 ] |
|
Author: {'name': 'Yuhong Zhang', 'email': 'yuhong.zhang@mongodb.com', 'username': 'YuhongZhang98'}Message: |