[Tarantool-patches] [PATCH 0/2] box/console: Fix hang on remote console enter

Alexander Turenko alexander.turenko at tarantool.org
Thu Oct 17 15:55:29 MSK 2019


On Wed, Oct 16, 2019 at 11:51:55PM +0300, Cyrill Gorcunov wrote:
> Alexander pointed that we might require more precise command handling
> when setting up eos in remote unix connection. Plain number of
> arguments in command strem is not enough. Otherwise one could
> call '\set language lua' and hang a connection.
> 
> Sasha could you please test if it fixes the problem for you?
> Actually I managed to repeat it without tarantoolctl but still.

It fixes tarantoolctl enter and the patchset looks good for me.

Pushed to master and 2.2.

> 
> ---
> The following changes since commit de9a7b1a37ec34054b062c513fa1bf9357699a8d:
> 
>   sql: use name instead of function pointer for UDF (2019-10-16 21:06:48 +0300)
> 
> are available in the Git repository at:
> 
>   https://github.com/tarantool/tarantool console-enter
> 
> for you to fetch changes up to 972d23c74fb4bff72889c7b6bd0455d39a4fa688:
> 
>   box/console: Test for exact command before setting eos (2019-10-16 23:45:51 +0300)
> 
> ----------------------------------------------------------------
> Cyrill Gorcunov (2):
>       box/console: Move param handlers into file scope
>       box/console: Test for exact command before setting eos

We usually start a commit header from a small letter when it is next to
a prefix; I mean: "box/console: move param handlers into file scope".

Changed it before push.

> 
>  src/box/lua/console.lua | 36 +++++++++++++++++++++---------------
>  1 file changed, 21 insertions(+), 15 deletions(-)

BTW, I suggest to use `luacheck file.lua` to protect youself from some
kind of mistakes. I use the following .luacheckrc file to reduce amount
of false-positives:

 | std = {
 |     read_globals = {'box', 'require', 'debug', 'pcall', 'xpcall', 'tostring',
 |         'tonumber', 'type', 'assert', 'ipairs', 'math', 'error', 'string',
 |         'table', 'pairs', 'os', 'select', 'unpack', 'dofile', 'next',
 |         'getmetatable', 'setmetatable', 'rawget', 'print', 'shard_status',
 |         'loadstring', 'arg',
 |     },
 |     globals = {'package', '_G'}
 | }
 | redefined = False

It is not ideal however, just eliminates some false-positive warns I met
before.

WBR, Alexander Turenko.


More information about the Tarantool-patches mailing list