[SERVER-51804] MongoDB should restart when WiredTiger detects corruption Created: 22/Oct/20  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Sulabh Mahajan Assignee: Backlog - Storage Engines Team
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to WT-6694 Memory leak issues when closing with ... Closed
Assigned Teams:
Storage Engines
Operating System: ALL
Participants:

 Description   

When WiredTiger (WT) encounters corruption, it sets a PANIC on the connection and begins to shutdown. A salvage error is returned, asking MongoDB to call wiredtiger_open with salvage set in the configuration to recover the data.

As part of the shutdown after detecting corruption, it is not safe to traverse the internal btree and evict data. The tree structure itself could be corrupted or we might end up writing corrupted data to the disk. Without going through eviction at the time of shutdown WiredTiger is unable to safely release memory that was used to build the cache. In such a case if MongoDB opens a new connection to WiredTiger to salvage, it is going to leak the memory previous WiredTiger connection did not free.

This ticket is going to investigate the cases where a new WT connection is opened after WT shuts down with corruption causing MongoDB to leak memory.

The related tickets might point out to BFs that have detected this memory leak.


Generated at Thu Feb 08 05:26:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.