[tarantool-patches] Re: [PATCH 3/3] box/lua/console: Verify remote protocol for compatibility

Konstantin Osipov kostja at tarantool.org
Fri Jul 12 23:47:19 MSK 2019


* Cyrill Gorcunov <gorcunov at gmail.com> [19/07/12 22:08]:
> +local function output_verify_remote(greeting)
> +    --
> +    -- In case if remote peer is operating over
> +    -- old yaml protocol we are unable to decode
> +    -- it to non-yaml serializers.
> +    if greeting.protocol == 'Lua console' then
> +        local d = box.session.storage.console_output
> +        if d ~= nil and d["fmt"] == "lua" then
> +            local msg1 = "Peer uses deprecated '%s' protocol. "
> +            local msg2 = "Switch output to 'yaml' format to proceed."
> +            return false, msg1:format(greeting.protocol) .. msg2
> +        end
> +    end
> +    return true, nil
> +end

what is the problem with doing yaml.load and serpent.encode for
such peers? 

What if it's a new peer but using yaml output?

-- 
Konstantin Osipov, Moscow, Russia




More information about the Tarantool-patches mailing list