If the refs option of the :info() read view method is set to true,
the returned info table will include refs key that contains a list
of all references taken for this read view. Each item in the list is
a table with the type field which is set to either thread for a
reference held by an application thread or fiber for a reference
taken by a fiber using the :with() method. The rest of the fields
depend on the reference type: for a thread reference the extra fields
are group_name and thread_id while for a fiber reference it's fid.
Example output:
tarantool> rv:info({refs = true})
---
- timestamp: 215658.72158296
id: 2
signature: 0
is_system: false
status: open
vclock: {1: 12}
name: my_read_view
refs:
- type: fiber
fid: 101
- type: thread
thread_id: 1
group_name: app
- type: thread
thread_id: 2
group_name: app
...
Note that fiber references include only fibers running in the calling
thread, and thread references are shown in the main thread only.
The method can be useful for figuring out why a particular read view
isn't closed.
Requested by @locker in tarantool/tarantool@a89cc05.
If the
refsoption of the:info()read view method is set to true,the returned info table will include
refskey that contains a listof all references taken for this read view. Each item in the list is
a table with the
typefield which is set to eitherthreadfor areference held by an application thread or
fiberfor a referencetaken by a fiber using the
:with()method. The rest of the fieldsdepend on the reference type: for a thread reference the extra fields
are
group_nameandthread_idwhile for a fiber reference it'sfid.Example output:
Note that fiber references include only fibers running in the calling
thread, and thread references are shown in the main thread only.
The method can be useful for figuring out why a particular read view
isn't closed.
Requested by @locker in tarantool/tarantool@a89cc05.