[SERVER-61475]  Fix the WTConfig string for temp WT instance. Created: 15/Nov/21  Updated: 29/Oct/23  Resolved: 02/Aug/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0-rc0

Type: Task Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: Suganthi Mani
Resolution: Fixed Votes: 0
Labels: shard-merge-milestone-1
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-61143 Import donated collections Closed
Backwards Compatibility: Fully Compatible
Sprint: Server Serverless 2023-04-17, Server Serverless 2023-05-01, Server Serverless 2023-05-15, Server Serverless 2023-05-29, Server Serverless 2023-06-26, Server Serverless 2023-07-10, Server Serverless 2023-07-24, Server Serverless 2023-08-07
Participants:

 Description   

When the recipient creates a temporary WT instance (to rollback-to-stable the donor files and record collection metadata), it calls wiredtiger_open with a config string. There are configuration options that might vary on the donor which the recipient must match, like "compressor=snappy". Figure out how to match these up, e.g. the donor sends a config string to the recipient via the recipientSyncData command, and the recipient stores the string in its state machine.

See: https://github.com/10gen/mongo/blob/0d3e3f270117064349f27e814dd27156dc1bdbb5/src/mongo/db/storage/wiredtiger/wiredtiger_import.cpp#L162-L166



 Comments   
Comment by Suganthi Mani [ 03/Aug/23 ]

Note to future readers: I tried to implement a fail safe mechanism to handle WT_PANIC failures (causes fatal assertion to throw) in temp WT instance. However, due to its complexity and the extreme rarity of encountering WT_PANIC errors in the temp WT instance, I deemed the fail-safe mechanism not worth implementing.

More context: I tried to register a custom error handler for the temp WT instance to inform importerService about WT_PANIC and uassert it before the WT API call returns that error, avoiding fasserting in uassertWTOK() . However, this approach poses a risk of memory leaks, and there is also a WT bug where the error handler won't be called for all WT_PANIC cases (see WT-11307). Therefore, I decided it's not worth fixing this extremely rare edge case."

Comment by Githook User [ 01/Aug/23 ]

Author:

{'name': 'Suganthi Mani', 'email': 'suganthi.mani@mongodb.com', 'username': 'smani87'}

Message: SERVER-61475 Ensure temp WT instance config matches primary WT instance.
Branch: minh.luu-no_compile_sys-perf
https://github.com/mongodb/mongo/commit/b78be3705b1dd4af5820a892674821f1739085d4

Comment by Githook User [ 31/Jul/23 ]

Author:

{'name': 'Suganthi Mani', 'email': 'suganthi.mani@mongodb.com', 'username': 'smani87'}

Message: SERVER-61475 Ensure temp WT instance config matches primary WT instance.
Branch: master
https://github.com/mongodb/mongo/commit/b78be3705b1dd4af5820a892674821f1739085d4

Comment by A. Jesse Jiryu Davis [ 17/Nov/21 ]

See example code: https://github.com/mongodb/mongo/blob/25993169a43f40d4f13d2eba8e6645598b62cc1c/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp#L370-L448

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