[SERVER-43114] Optimize seekExact for WiredTiger Created: 30/Aug/19  Updated: 27/Oct/23  Resolved: 06/Sep/19

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

Type: Improvement Priority: Major - P3
Reporter: Xiangyu Yao (Inactive) Assignee: Louis Williams
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-42972 Callers of SortedDataInterface::seekE... Closed
Participants:

 Description   

Currently, WiredTigerIndex::seekExact converts the KeyString passed in into BSON and then converts it to KeyString again with a discriminator byte. This is related to how we store RecordId at the end of KeyString and use WT's search_near() and then selectively call prev()/next() on the cursor. In the reverse cursor way, we want to append a kExclusiveAfter so that it can land on the exact match.

This is certainly unideal, as we have to do two extra conversions just for appending a discriminator when it's a reverse cursor. Maybe WiredTigerIndex::seekExact should use a different combinations of WT's search_near(), prev() and next() to find the match so that we don't need to append any discriminator byte. Or maybe we just need to add a helper method on KeyString that could easily append a discriminator byte to itself.



 Comments   
Comment by Louis Williams [ 06/Sep/19 ]

This problem this ticket describes no longer exists because of the changes in SERVER-42972.

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