-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
api: fix INIT
state stuck
#227
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason to block queue_init()
until orphan
mode switched? 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 |
Yes, it is. When the status check will success - initialize the instance in a background. |
2c94e6a
to
c42768c
Compare
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. |
5ebc059
to
854a373
Compare
854a373
to
2cb75ad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
0524b35
to
b07da0c
Compare
155dc3f
to
8a440ed
Compare
8a440ed
to
9eb38b3
Compare
9eb38b3
to
dad5971
Compare
59a4032
to
4bdc2dd
Compare
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 the `INIT` 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
4bdc2dd
to
530c026
Compare
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