[SERVER-63585] Fastcount gets out of sync when a delete rollbacks and another transaction deletes the same rows Created: 11/Feb/22 Updated: 29/Oct/23 Resolved: 15/Feb/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.3.0, 4.4.18, 5.0.14 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Daniel Gomez Ferro | Assignee: | Daniel Gomez Ferro |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Backport Requested: |
v5.0, v4.4, v4.2
|
||||||||||||||||||||
| Sprint: | Execution Team 2022-02-21 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Linked BF Score: | 13 | ||||||||||||||||||||
| Description |
|
In the WiredTigerRecordStore we keep track of the number of records we hold. When a transaction rollbacks we patch up the metadata so that eventually it stays in sync with the real number of rows, even though it can get out of sync if there's a crash. To fix up issues after a crash, we clamp the value to a positive integer however this can cause problems if there are rollbacks:
We should allow negative values of numRecords so that the metadata patching process works correctly. |
| Comments |
| Comment by Githook User [ 31/Oct/22 ] |
|
Author: {'name': 'Daniel Gómez Ferro', 'email': 'daniel.gomezferro@mongodb.com', 'username': 'dgomezferro'}Message: |
| Comment by Githook User [ 31/Oct/22 ] |
|
Author: {'name': 'Daniel Gómez Ferro', 'email': 'daniel.gomezferro@mongodb.com', 'username': 'dgomezferro'}Message: |
| Comment by Daniel Gottlieb (Inactive) [ 12/Oct/22 ] |
|
I've requested a backport as I came across a manifestation of this on a recent 5.0 patch run that resulted in some folks thinking they might have broke something. |
| Comment by Githook User [ 15/Feb/22 ] |
|
Author: {'name': 'Daniel Gómez Ferro', 'email': 'daniel.gomezferro@mongodb.com', 'username': 'dgomezferro'}Message: |