[SERVER-52833] Capped collections can contain too many documents after replication recovery Created: 12/Nov/20 Updated: 29/Oct/23 Resolved: 23/Feb/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0, 4.4.5, 4.2.14, 4.0.25 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Gregory Noma | Assignee: | Gregory Noma |
| 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: |
v4.4, v4.2, v4.0
|
||||||||||||||||||||
| Sprint: | Execution Team 2021-02-08, Execution Team 2021-02-22, Execution Team 2021-03-08 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Linked BF Score: | 15 | ||||||||||||||||||||
| Description |
|
Starting in This causes an issue for capped collections when the number of inserts applied during replication recovery is greater than collection's max number of documents. Since we're erroneously not adjusting the count, these documents will not delete other documents already inserted during replication recovery, causing the capped collection to contain more documents than it should until collection validation is run to correct the fast count. The following jstest reproduces the issue:
|
| Comments |
| Comment by Githook User [ 07/May/21 ] |
|
Author: {'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}Message: |
| Comment by Githook User [ 22/Apr/21 ] |
|
Author: {'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}Message: |
| Comment by Githook User [ 18/Mar/21 ] |
|
Author: {'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}Message: (cherry picked from commit 8b9744aea1d1bde164d0b0fcf6d184ec5161013f) |
| Comment by Githook User [ 23/Feb/21 ] |
|
Author: {'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}Message: |