[SERVER-48230] fix oplog cursor leak in getEarliest/LatestOplogTimestamp() Created: 14/May/20 Updated: 29/Oct/23 Resolved: 15/May/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | None |
| Fix Version/s: | 4.4.0-rc7, 4.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Eric Milkie | Assignee: | Daniel Gottlieb (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Backport Requested: |
v4.4
|
||||||||||||||||
| Sprint: | Execution Team 2020-05-18 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
WiredTigerRecordStore::getLatestOplogTimestamp() and WiredTigerRecordStore::getEarliestOplogTimestamp() open a new cursor every time they are called. This should be switched to using the cached cursor functionality provided in WiredTigerCursor. |
| Comments |
| Comment by Mark Callaghan (Inactive) [ 29/May/20 ] |
|
I can't reproduce memory leaks in rc7 while I could in rc6 using IO-bound insert benchmark. This is good news. |
| Comment by Githook User [ 15/May/20 ] |
|
Author: {'name': 'Daniel Gottlieb', 'email': 'daniel.gottlieb@mongodb.com', 'username': 'dgottlieb'}Message: (cherry picked from commit 0553eb750667692d25959c3b080156a6117789cf) |
| Comment by Githook User [ 15/May/20 ] |
|
Author: {'name': 'Daniel Gottlieb', 'email': 'daniel.gottlieb@mongodb.com', 'username': 'dgottlieb'}Message: |
| Comment by Daniel Gottlieb (Inactive) [ 15/May/20 ] |
|
Demonstration of the fix on 1,000 transactions (calls to getLatestOplogTimestamp). Left is pre-fix, right is post-fix: |