-
Type:
New Feature
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Storage Engines, Storage Engines - Foundations
-
None
-
None
Task: design and add an implementation for a "config:" cursor.
A skeleton of the config cursor exists in the src/cursor/cur_config.c file. It currently implements only "open" and "close" functions. Everything else is either unimplemented or using generic implementation.
Basic requirements (to be done within this ticket):
- The cursor should be able to retrieve numeric values from the current connection config as int64_t.
- The key should be either an enum WT_CONF_ID_* from src/include/conf_keys.h or a full dot-separated path string.
- Boolean values are returned as 0 or 1.
- If a value can't be represented as an integer (e.g. string, list, subconfig), an error should be returned.
Further extensions (if not implemented within this ticket, create additional tickets to implement it):
- Ability to specify the key as either enum or text string.
- Ability to retrieve the values as string.
- Access to lists.
- Access to session-level (and other) configs similarly to what "statistics" cursor does (see __wt_curstat_init() for details).
Note: there are multiple ways to specify the type of the key and of the value - it can be done via a config when opening a cursor or via an additional argument for set_key() and get_value(). Specifying types right at set_key() and get_value() could be less error-prone but might be harder to implement. If different types are not implemented as part of this ticket, the variable arguments to set_key() and get_value() should be designed in advance.