Skip to content

Document upcoming changes in 1.7 net.box #62

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

Closed
mejedi opened this issue Sep 26, 2016 · 0 comments
Closed

Document upcoming changes in 1.7 net.box #62

mejedi opened this issue Sep 26, 2016 · 0 comments
Assignees

Comments

@mejedi
Copy link
Contributor

mejedi commented Sep 26, 2016

tarantool/tarantool@3b81e95

  • formerly, net.box could work both over Binary and Lua console protocols. Support for Lua console was dropped. Anyway, when the protocol was Lua console, 99% of net.box features didn't work;

  • dropped :console() method in net.box (which was undocumented anyway);

  • added :wait_state() method, ex:

    cn:wait_state('active')
    cn:wait_state('active', 1.5) -- timeout 1.5 secs
    cn:wait_state({active=true, fetch_schema=true}) -- waiting for either `active` or `fetch_schema` states

    returns true if target state was reached, false otherwise (timeout or connection closed;)

  • please document states and transitions (see https://github.com/tarantool/tarantool/blob/1.7/src/box/lua/net_box.lua#L106)

  • added call_16 option in net.box.connect (Eval-style marshalling in IPROTO_CALL (1.7) tarantool#1296);

  • please document wait_connected option (by default connect() blocks until the connection is established, passing wait_connected=false makes it return immediately; also: wait_connected=1.5 makes it wait at most 1.5 secs before returning);

Breaking changes

Ideally, there should be one dedicated page, that lists breaking changes for the particular release and provides migration instruction. Concerning net.box, the breaking changes are:

  • internals changed, code depending on undocumented internals WILL break;
  • :wait_connected() returns true, as the docs say (formerly, it returned active/closed;)
  • CALL_16 (linked above). New and old call semantics are incompatible in subtle ways. It is suggested to follow this update procedure:
    1. Update code first. Add call_16=true in net.box.connect() options. This step ensures that semantics won't change when new Tarantool is deployed. This option is ignored by older Tarantool.
    2. Update Tarantool.
    3. Ensure that all servers connections are made to are running 1.7. Older servers don't implement new CALL semantics and an attempt to make a «new» call will result in connection termination.
    4. Remove call_16=true added during step Upload web-site directly to Amazon S3 / CloudFront #1.
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

No branches or pull requests

2 participants