Skip to content
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

Document required_protocol_version/features net.box options #2418

Closed
Tracked by #2646 ...
Totktonada opened this issue Nov 9, 2021 · 0 comments · Fixed by #2912
Closed
Tracked by #2646 ...

Document required_protocol_version/features net.box options #2418

Totktonada opened this issue Nov 9, 2021 · 0 comments · Fixed by #2912
Assignees
Labels
feature A new functionality reference [location] Tarantool manual, Reference part server [area] Task relates to Tarantool's server (core) functionality

Comments

@Totktonada
Copy link
Member

Totktonada commented Nov 9, 2021

Product: Tarantool
Root document: https://www.tarantool.io/en/doc/latest/reference/reference_lua/net_box/
SME: @ locker
Peer reviewer: @

Details

Two new options can now be passed to net.box.connect():

  • required_protocol_version: min IPROTO protocol version that must be
    supported by the server. Type: unsigned integer.
  • required_protocol_features: array of IPROTO protocol features that
    must be supported by the server. Type: array of strings.

If the server version is less than the specified or the server lacks
certain features, the connection will fail with the corresponding error.

Querying server features is implemented via the IPROTO_ID command.
Currently, there are two features defined: streams and transactions.

Irrespective of the options used, the actual version and features are
reported via peer_protocol_version and peer_protocol_features fields of
the connection. Example:

tarantool> require('net.box').connect(3301, {
         > required_protocol_version = 1,
         > required_protocol_features = {'transactions'},
         > })
---
- peer_protocol_version: 1
  peer_uuid: 7a8cfdbd-6bbc-4d10-99e5-cbbd06a2382f
  opts:
    required_protocol_version: 1
    required_protocol_features:
    - transactions
  peer_protocol_features:
    transactions: true
    streams: true
  schema_version: 80
  protocol: Binary
  state: active
  peer_version_id: 133632
  port: '3301'
...

Requested by @locker in tarantool/tarantool@47a85f9

@xuniq xuniq added this to the Estimate [@xuniq] milestone Dec 9, 2021
@xuniq xuniq added feature A new functionality reference [location] Tarantool manual, Reference part server [area] Task relates to Tarantool's server (core) functionality labels Dec 9, 2021
@xuniq xuniq changed the title Document required_protocol_version/features net.box options [2pt?] Document required_protocol_version/features net.box options Dec 9, 2021
@xuniq xuniq changed the title [2pt?] Document required_protocol_version/features net.box options [3pt] Document required_protocol_version/features net.box options Dec 10, 2021
@xuniq xuniq removed this from the Estimate [@xuniq] milestone Dec 10, 2021
@veod32 veod32 added this to the net.box milestone Jan 13, 2022
@patiencedaur patiencedaur removed this from the net.box milestone Feb 1, 2022
@veod32 veod32 assigned rindblack15 and unassigned xuniq May 6, 2022
@rindblack15 rindblack15 added 1sp and removed 3sp labels May 12, 2022
@rindblack15 rindblack15 changed the title [3pt] Document required_protocol_version/features net.box options Document required_protocol_version/features net.box options May 16, 2022
@rindblack15 rindblack15 linked a pull request Jun 2, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new functionality reference [location] Tarantool manual, Reference part server [area] Task relates to Tarantool's server (core) functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants