[SERVER-52950] recoverOplogAsStandalone mode must not start oplog truncater thread Created: 19/Nov/20 Updated: 29/Oct/23 Resolved: 07/Dec/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0, 4.4.3, 4.2.12, 4.0.23 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Daniel Gottlieb (Inactive) | Assignee: | Gregory Wlodarek |
| 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 2020-12-14 | ||||||||
| Participants: | |||||||||
| Case: | (copied to CRM) | ||||||||
| Description |
|
This is observed on 4.0, but I imagine applies to 4.4 and 4.2. The oplog truncater thread checks for readonly, but not for recoverFromOplogAsStandalone. At startup with recoverFromOplogAsStandalone, the node will open WT in read+write mode and perform replication recovery. After replication recovery, the readOnly flag gets flipped to prevent external users from doing writes. Because the readonly flag is flipped after the oplog truncater thread is started up, the truncater thread can attempt to perform a write that will fail. |
| Comments |
| Comment by Githook User [ 09/Jan/21 ] |
|
Author: {'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}Message: |
| Comment by Githook User [ 09/Jan/21 ] |
|
Author: {'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}Message: (cherry picked from commit 3417215850d7a577452552499ea55d1872199d74) |
| Comment by Githook User [ 18/Dec/20 ] |
|
Author: {'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}Message: |
| Comment by Githook User [ 14/Dec/20 ] |
|
Author: {'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}Message: (cherry picked from commit 3be0c64532e121780dd11788fa3db4a9089b008c) |
| Comment by Githook User [ 05/Dec/20 ] |
|
Author: {'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}Message: |
| Comment by Gregory Wlodarek [ 01/Dec/20 ] |
|
The change in In versions >= v4.4:
In versions < v4.4:
tldr; versions >= v4.4 don't start the background thread but still calculate the oplog stones, and versions < v4.4 need to stop starting the background thread when recoverFromOplogAsStandalone=true. |