Skip to content

cluster discovery: discard non-list result #196

Closed

Description

@Totktonada

From README:

A discovery function should return a single result of strings (i.e. single string return 'host:3301' or array of strings return {'host1:3301', 'host2:3301'}).

I think there is no reason to support single string result. However if we'll support it here it will push other connectors to support it too (because a user that see correct result with tarantool-java will expect they will be correct with another connector too).

I propose to forbid support of this single string response format and allow only a list of strings result.

Validation rules and to be defined and maybe should be strictier that now and consistent with other connectors. Maybe this should not be handled with the scope of this issue.

Activity

  1. nicktorwald commented on Jun 3, 2019

    @nicktorwald

    We can only fix docs here, I think.
    Because there are no differences between return 'host' and return {'host'} in terms of msgpack. Both results will be deserialized as a single item collection ArrayList = {'host'}.

  2. Totktonada commented on Jun 3, 2019

    @Totktonada
    Author

    'host' is a4686f7374, {'host'} is 91a4686f7374. If they are really undistinguishable, it is something strange on the connector side.

  3. nicktorwald commented on Jun 3, 2019

    @nicktorwald

    hm... It seems Lua returns an array in both cases 0x91 0xA4 0x68 0x6F 0x73 0x74 when we use old iproto_call_16 (0x06) instead of iproto_call (0x0a).

  4. Totktonada commented on Jun 3, 2019

    @Totktonada
    Author

    That is so. We should newer use call_16, tarantool-1.6 is gone a long time ago. It seems we can remove it entirely.

  5. added a commit that references this issue on Jul 1, 2019
    f4bb48c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions