tarantool.config: add `wait_status` helper
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 15
- Forks
- 49
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 3
Description
Related dev. issue(s): https://github.com/tarantool/tarantool/pull/12439
Product: Tarantool
Since: 3.7
Root document: https://www.tarantool.io/en/doc/latest/reference/reference_lua/config/
SME: @georgiy-belyanin, @mandesero
Details
Introduce a new helper function config:wait_status() that allows waiting for one of the specified configuration statuses.
config API
config:wait_status(statuses[, timeout])
Wait until the instance reaches one of the specified configuration statuses.
The call is blocking: it suspends the current fiber until the instance transitions to any of the given statuses. If no timeout is specified, the function waits indefinitely.
Parameters:
statuses(table) - a list of statuses to wait fortimeout(number) - maximum time to wait (in seconds); if not specified, waits indefinitely
Return: the reached status
Example:
local function apply(cfg)
fiber.create(function()
-- Wait until status changes to one of the expected values.
-- If the status never reaches 'check_errors', this fiber will block indefinitely.
local status = config:wait_status({'check_errors'})
if status == 'check_errors' then
-- Handle configuration errors
end
end)
-- Continue applying configuration
end
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
Start with the root document at reference/reference_lua/config/ and review related development pull request #12439 for the implementation context. Document the config:wait_status() API, including statuses, optional timeout, blocking behavior, return value, and the example shown here. Done means the helper is accurately represented in the configuration reference and the documentation build passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 30/100