Document `refs` field of `read_view.info`
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 15
- Forks
- 49
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 3
Description
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 https://github.com/tarantool/tarantool/commit/a89cc05c5ad906204054b28a33dab06a0a244a86.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the existing API reference for the read_view.info method and add documentation for the refs option using the behavior and YAML example in this issue. Include the thread and fiber reference fields, their visibility notes, and the use case for finding unclosed read views. Done means the reference clearly explains the returned refs data and matches the shown output.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 75/100