[SERVER-28743] Make all WT cursor uses of keys --groupCollections aware. Created: 11/Apr/17  Updated: 15/Sep/20  Resolved: 02/Jun/17

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

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

Issue Links:
Related
is related to SERVER-29113 Have WT grouped collections support r... Closed
is related to WT-3341 Allow random cursor scan range to be ... Closed
Backwards Compatibility: Fully Compatible
Sprint: Storage 2017-05-08, Storage 2017-05-29, Storage 2017-06-19
Participants:

 Description   

When WT is running in --groupCollections mode all collections (but not indexes) with a prefix that are creating a WT table must change the configuration input key_format=q to key_format=qq. This changes the "key" value from being an int64 to instead be two adjacent int64. The key format for indexes should be changed from "u" to "qu".

When performing WT_CURSOR::set_key, the key value must be modified when its collection/index is sharing a WT table with other collection/indexes.

Furthermore, all calls to WT_CURSOR::next/prev that do not return a WT_NOTFOUND must also extract the key and compare the prefix found with that of the collection/index it represents.

It may be desirable to add a "[reading] cursor" abstraction that sits between the WiredTiger[RecordStore|Index]::Cursor and their current raw usage of WT_CURSOR. This abstraction would encapsulate the logic of transforming a cursor that iterates into an adjacent collection/index into a logical EOF.

Collections/indexes that have no prefix should not suffer an undue performance penalty unnecessarily constructing and parsing keys.



 Comments   
Comment by Githook User [ 02/Jun/17 ]

Author:

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

Message: SERVER-28743: Have WiredTiger data structures be --groupCollections aware.

WiredTigerRecordStores and WiredTigerIndexes instantiated with a KVPrefix
will now transparently persist and query for data with the associated
prefix. A prefix is represented as a 64-bit integer and is concatenated
onto each key inserted into each grouped RecordStore/Index.
Branch: master
https://github.com/mongodb/mongo/commit/b102f090bd7ce83502984fcb70b4748be5bdb2b8

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