-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Configuration
-
None
-
Storage Engines
WT-11126 uses IDs for every key. That means a lookup like
WT_ERR(__wt_conf_gets_def(session, conf, isolation, 0, &cval))
translates (via a macro) into a function call to look up integer id WT_CONF_ID_isolation.
y.ershov@mongodb.com made a great suggestion during the review that instead of declaring
WT_CONF *conf
we could declare:
WT_CONF_session_begin_transaction *conf
That structure could be something like:
typedef struct { WT_CONFIG_ITEM isolation; WT_CONFIG_ITEM sync; struct { WT_CONFIG_ITEM prepared; WT_CONFIG_ITEM read; } roundup_timestamps; } WT_CONF_session_begin_transaction;
Then getting value amounts to:
cval = conf->isolation;
This is all hidden by a macro, so the WT code remains as:
WT_ERR(__wt_conf_gets_def(session, conf, isolation, 0, &cval))
It's not entirely that simple, we do need to do something a bit different with bound arguments.
The only drawback I see is how we deal with sets of keys that are shared among multiple APIs. If there is a common function that parses the configs for say, open_session and session->reconfigure, how do we share that? I think there are solutions to this.
- is depended on by
-
WT-12567 Add configuration compilation to WT_SESSION.open_cursor
- Open