-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
None
@michaelcahill, these are the changes to move management of data-source metadata entries down into the data-source code.
I'd like to talk over a few different questions after you get a chance to look it over.
1. There's some question how I'm using the name-space – right now I'm stuffing in a new record with a key of
:WiredTiger.maxid
, which is safe from applications, but potentially surprising to the WiredTiger engine.
2. I exported 4 metadata functions (search, insert, remove and update), where insert fails if the record already exists, but update uses the underlying cursor.insert method with "overwrite" configured, and so will either insert a new record or update an existing one. That doesn't quite match standard cursor.update behavior, of course.
We could export cursor open/close interface to the metadata file instead of 4 specific functions: then the extension can configure the cursor behavior it wants and there's nothing surprising in update inserting new records, plus extensions can do metadata scans should they need to.
3. I am unhappy I have to do work for session.rename inside the extension. It seems wrong to me that the extension has to futz with its names because the WiredTiger schema layer is renaming a table.
If session.create chose the URI and then returned it to the table code (rather than the table code choosing the name the underlying source has to use), the schema level could ignore "source=XXX" during renames, and the extension code wouldn't have to do any work.