[SERVER-25232] QueryableBackupMode + WT causes a full database scan Created: 22/Jul/16  Updated: 06/Dec/22  Resolved: 04/Aug/16

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

Type: Improvement Priority: Major - P3
Reporter: Daniel Gottlieb (Inactive) Assignee: Backlog - Storage Execution Team
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Assigned Teams:
Storage Execution
Backwards Compatibility: Fully Compatible
Participants:

 Description   

QueryableBackupMode will cause the `_sizeStorer` member to not be instantiated: https://github.com/mongodb/mongo/blob/master/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp#L269

When the `_sizeStorer` does not exist, the WiredTigerRecordStore ctor table scans to count up how many documents exist: https://github.com/mongodb/mongo/blob/master/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp#L855

This is not ideal. It seems that the size storer should be able to read data off disk while in QueryableBackupMode to initialize its state, while also avoiding any writes to disk as data should not be changing.



 Comments   
Comment by Githook User [ 04/Aug/16 ]

Author:

{u'username': u'dgottlieb', u'name': u'Daniel Gottlieb', u'email': u'daniel.gottlieb@10gen.com'}

Message: SERVER-25232: Avoid table scans on startup with queryableBackupMode WT
Branch: master
https://github.com/mongodb/mongo/commit/b8c9312f13de0d05232bfb68966f5da4ce27328d

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