[DOCS-16533] Investigate changes in SERVER-82970: Remove cursor cache from server as WiredTiger already caches cursor Created: 07/Dec/23  Updated: 08/Jan/24  Resolved: 15/Dec/23

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: 7.3.0-rc0, Server_Docs_[20240108]

Type: Task Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Unassigned
Resolution: Gone away Votes: 0
Labels: feature, top250
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-82970 Remove cursor cache from server as Wi... Backlog
Related
related to SERVER-34024 Disable WiredTiger cursor cache by de... Closed
URL(s): https://www.mongodb.com/docs/manual/core/wiredtiger/#memory-use
Participants:
Days since reply: 7 weeks, 6 days ago

 Description   
Original Downstream Change Summary

The config wiredTigerCursorCacheSize is removed.

Description of Linked Ticket

I noticed that there is also a cursor cache in server.

WT_CURSOR* WiredTigerSession::getCachedCursor(uint64_t id, const std::string& config) {
    // Find the most recently used cursor
    for (CursorCache::iterator i = _cursors.begin(); i != _cursors.end(); ++i) {
        // Ensure that all properties of this cursor are identical to avoid mixing cursor
        // configurations. Note that this uses an exact string match, so cursor configurations with
        // parameters in different orders will not be considered equivalent.
        if (i->_id == id && i->_config == config) {
            WT_CURSOR* c = i->_cursor;
            _cursors.erase(i);
            _cursorsOut++;
            return c;
        }
    }
    return nullptr;
}

Given that we already have a cursor cache in WiredTiger. I feel this is inefficient and we are duplicating our effort.

Review the background why we do this in server and whether it is beneficial to remove the cache from server and let WiredTiger to handle the cursor cache.



 Comments   
Comment by Louis Williams [ 14/Dec/23 ]

heads up this change is getting reverted

Generated at Thu Feb 08 08:15:35 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.