[SERVER-48981] Implement local isolation for fastcount for Biggie RecordStore Created: 18/Jun/20 Updated: 27/Oct/23 Resolved: 03/May/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Henrik Edin | Assignee: | Backlog - Storage Execution Team |
| Resolution: | Gone away | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Assigned Teams: |
Storage Execution
|
||||||||||||
| Sprint: | Execution Team 2020-06-29, Execution Team 2020-07-13 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
Biggie implements fastcount similar to how it is implemented on WT. The fastcount get updated immediately on inserts and deletes before the write unit of work is committed. In case of a rollback it is adjusted back. However write conflicts on the biggie engine happens at commit time leading to the fastcount will be wrong until the commit where the write conflict is thrown. Running jstests/concurrency/fsm_workloads/upsert_unique_index.js over biggie triggers the following assert: https://github.com/mongodb/mongo/blob/e57156eff2a2ff5dbb1b6a75fee246241206453f/src/mongo/db/storage/biggie/biggie_record_store.cpp#L576 The fastcount will go negative during the test above |
| Comments |
| Comment by Louis Williams [ 03/May/22 ] |
|
Closing because we have removed EphemeralForTest |
| Comment by Githook User [ 13/Jul/20 ] |
|
Author: {'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com', 'username': 'henrikedin'}Message: Local isolation of the count is required to prevent negative values because how this storage engine emits write conflict exceptions. |