Closed DerekBum closed 3 months ago
The wait and the queue initialization could be done in a background as it is done by
box.cfg
wrapper now.
Tarantool does not call box.cfg {}
upon exiting the orphan mode. Or are you suggesting to run a fiber in a background, that will check status of the instance. And if the orphan mode changes, it updates the status?
The wait and the queue initialization could be done in a background as it is done by
box.cfg
wrapper now.Tarantool does not call
box.cfg {}
upon exiting the orphan mode. Or are you suggesting to run a fiber in a background, that will check status of the instance. And if the orphan mode changes, it updates the status?
Yes, it is. When the status check will success - initialize the instance in a background.
Updated the code. Now watcher is run in a different fiber, without blocking init function. Note that now this fix only works for Tarantool versions >= 2.10.0. On newer versions this bug will still be present.
Sometimes, instance could enter the queue initialization while still not running (for example, left in the orphan mode). This resulted in "lazy start". But Tarantool does not call
box.cfg {}
after leaving orphan mode, so queue could stuck in theINIT
state.Now if the instance is read-only, separate fiber is watching for updates of its mode.
Note that this fix works only for Tarantool versions >= 2.10.0. This is because of used watchers.
Closes #226