Skip to content

Document refs field of read_view.info #5722

Description

@TarantoolBot

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions