From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 491AA20BAE for ; Thu, 5 Sep 2019 17:28:20 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Wk88J4NXpclx for ; Thu, 5 Sep 2019 17:28:20 -0400 (EDT) Received: from mail-lf1-f65.google.com (mail-lf1-f65.google.com [209.85.167.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id F41C020BA1 for ; Thu, 5 Sep 2019 17:28:19 -0400 (EDT) Received: by mail-lf1-f65.google.com with SMTP id q27so3227961lfo.10 for ; Thu, 05 Sep 2019 14:28:19 -0700 (PDT) From: Cyrill Gorcunov Subject: [tarantool-patches] [PATCH v3 0/6] box/console: Improve lua mode for remote console Date: Fri, 6 Sep 2019 00:28:09 +0300 Message-Id: <20190905212815.7311-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: tml Cc: Konstantin Osipov , Alexander Turenko , Cyrill Gorcunov This series address a problem where we can hang a connection setting up lua mode while server continue treating all data as having built-in yaml end of string terminator. We've a long discussion with @alexander.turenko about our test engine and console eos in general and at first concluded that by default we should not use ";" as lua terminator but continue using empty string instead. Actually after thinking more I fear it won't work -- a user might connect to remote console and this connection will hang because server will reply with empty eos while we're using read() from socket with terminator at the end of string. Moreover since our yaml serializer *always* yield eos terminator I think we should do the same for lua mode just to be consistent in architecture. Still for convenience I added ability to zap lua terminator via require('console').eos("") command. Thus users on local consoles can drop ';' eos if they want to. v3: - address Kostya comments The following changes since commit 51d8e4c35ca1da255b4ebea9850ec2a84365e0a3: box/memtx: strip_core -- Warn on linux only (2019-08-29 22:27:15 +0300) are available in the Git repository at: https://github.com/cyrillos/tarantool console-fix-2 for you to fetch changes up to 6c07d1f174eae99fcb86120ffd07f69e2dc6e4d2: box/console: Rename output_parse to parse_output (2019-09-06 00:03:23 +0300) ---------------------------------------------------------------- Cyrill Gorcunov (6): box/console: Add mapping for direct symbols box/console: Add explicit output EOS mapping box/console: Refactor command handling box/console: Fix hang in remote console lua mode box/console: Provide console.eos() api box/console: Rename output_parse to parse_output src/box/lua/console.lua | 149 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 132 insertions(+), 17 deletions(-)