Skip to content
Snippets Groups Projects
user avatar
Vladimir Davydov authored
To support accessing tuple fields by name, we create a runtime tuple
format for each space read view, using the space field names to
initialize the field dictionary.

Note, we can't reuse the space tuple format as is, because it allocates
tuples from the engine arena, which is single-threaded, while a read
view may be used from any thread, not just tx. The runtime arena is
single-threaded as well, but we will make it per-thread in future.

Note, we can't even reuse tuple field dictionary - we create a new one
using the space definition instead - because the dictionary is in fact
mutable - it may be changed when the space definition is altered, see
tuple_dictionary_swap.

Good news is runtime tuple formats are reusable so if we create several
read views of the same space, they will all use the same tuple format.

Since this feature isn't required for snapshots/replication, we add
a read view option to enable it - read_view_opts::needs_field_names.

Needed for https://github.com/tarantool/tarantool-ee/issues/207

NO_DOC=internal
NO_TEST=ee
NO_CHANGELOG=internal
08070d45
History
Name Last commit Last update