[SERVER-81508] Potential double-execution of write statements when ShardCannotRefreshDueToLocksHeld is thrown Created: 27/Sep/23 Updated: 11/Jan/24 Resolved: 16/Nov/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding, Write Ops |
| Affects Version/s: | 5.0.0, 6.0.0, 7.0.0, 7.1.0-rc3 |
| Fix Version/s: | 7.2.1, 7.3.0-rc0, 7.1.2, 7.0.6, 5.0.25, 6.0.14 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Lingzhi Deng | Assignee: | Paolo Polato |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | shardingemea-qw | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Assigned Teams: |
Sharding EMEA
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Backport Requested: |
v7.2, v7.1, v7.0, v6.0, v5.0
|
||||||||||||
| Sprint: | Sharding EMEA 2023-10-16, Sharding EMEA 2023-10-30, CAR Team 2023-11-13, CAR Team 2023-11-27 | ||||||||||||
| Participants: | |||||||||||||
| Story Points: | 2 | ||||||||||||
| Description |
|
Write commands currently throw ShardCannotRefreshDueToLocksHeld as a top-level command error (i.e. ok: 0 with ShardCannotRefreshDueToLocksHeld). Additionally, mongos/shard may retry a command upon ShardCannotRefreshDueToLocksHeld error. And this is problematic if refreshing the cache fails with ShardCannotRefreshDueToLocksHeld in between write statements (e.g. flushRouterConfig is a user-facing command which could cause the CatalogCache to become stale for the temporary resharding collection). This is because some write statements may have been done before ShardCannotRefreshDueToLocksHeld was thrown and retrying the entire command may cause double execution for those write statements. |
| Comments |
| Comment by Githook User [ 11/Jan/24 ] |
|
Author: {'name': 'Paolo Polato', 'email': 'paolo.polato@mongodb.com', 'username': 'ppolato'}Message: (cherry picked from commit e175711195ce55401a2833dfbc30ee515599a2bc) GitOrigin-RevId: 523bc79834ccd2741627e1247c18e33482e58ae0 |
| Comment by Githook User [ 10/Jan/24 ] |
|
Author: {'name': 'Paolo Polato', 'email': 'paolo.polato@mongodb.com', 'username': 'ppolato'}Message: (cherry picked from commit e175711195ce55401a2833dfbc30ee515599a2bc) GitOrigin-RevId: ba9e3277b29b52bf8003a79696f9af9571e765ba |
| Comment by Githook User [ 08/Jan/24 ] |
|
Author: {'name': 'Paolo Polato', 'email': 'paolo.polato@mongodb.com', 'username': 'ppolato'}Message: (cherry picked from commit e175711195ce55401a2833dfbc30ee515599a2bc) GitOrigin-RevId: c0aa44439617e549df55d4b3bb06c2e7af68f3b5 |
| Comment by Githook User [ 08/Jan/24 ] |
|
Author: {'name': 'Paolo Polato', 'email': 'paolo.polato@mongodb.com', 'username': 'ppolato'}Message: (cherry picked from commit bec596c52e0c524fe835eac39c47d6db831e0493) |
| Comment by Githook User [ 19/Dec/23 ] |
|
Author: {'name': 'Paolo Polato', 'email': 'paolo.polato@mongodb.com', 'username': 'ppolato'}Message: (cherry picked from commit bec596c52e0c524fe835eac39c47d6db831e0493) |
| Comment by Githook User [ 15/Nov/23 ] |
|
Author: {'name': 'Paolo Polato', 'email': 'paolo.polato@mongodb.com', 'username': 'ppolato'}Message: |