Skip to content

core: fix missing _VERSION on read-write instances - #269

Open
nsadovskiy wants to merge 1 commit into
tarantool:masterfrom
nsadovskiy:n.sadovskiy/fix-version-on-rw-instance
Open

nsadovskiy wants to merge 1 commit into
tarantool:masterfrom
nsadovskiy:n.sadovskiy/fix-version-on-rw-instance

Conversation

@nsadovskiy

Copy link
Copy Markdown

queue._VERSION was set only on the stub that require('queue') returns while the queue cannot start yet. If the instance was already in read-write mode when the module was loaded, require('queue') returned the queue.abstract table itself, and that table has no _VERSION. So the field was nil on masters and routers, and it was set only on read-only replicas.

Declare _VERSION in queue.abstract, which becomes the module or is copied into it on every start path, and make the stub take the value from there.

Closes #260

`queue._VERSION` was set only on the stub that `require('queue')`
returns while the queue cannot start yet. If the instance was already
in read-write mode when the module was loaded, `require('queue')`
returned the `queue.abstract` table itself, and that table has no
`_VERSION`. So the field was `nil` on masters and routers, and it was
set only on read-only replicas.

Declare `_VERSION` in `queue.abstract`, which becomes the module or is
copied into it on every start path, and make the stub take the value
from there.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

queue: _VERSION clean at master instances and routers

1 participant