Tarantool development patches archive
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: tml <tarantool-patches@freelists.org>
Cc: Alexander Turenko <alexander.turenko@tarantool.org>,
	Konstantin Osipov <kostja@tarantool.org>,
	Kirill Yukhin <kyukhin@tarantool.org>,
	Cyrill Gorcunov <gorcunov@gmail.com>
Subject: [tarantool-patches] [PATCH v2 0/5] box/console: Improve lua mode for remote console
Date: Sat, 31 Aug 2019 00:48:03 +0300	[thread overview]
Message-ID: <20190830214808.17422-1-gorcunov@gmail.com> (raw)

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.

Next to test engine:

1) I think we should convert each test one by one, not the
   whole bunch of tests in a single pass

2) For this sake we need to send something like "\set output lua"
   to the server for a particular test

3) We need to describe somehow which mode a test uses. Sasha pointed
   that he has a string on top of "result" file where we could provide
   some kind of settings describing output mode. But I think maybe we
   could introduce .desc files in json format where we could add per-file
   settings instead (in addition to ini files). Putting test description
   in "result" file looks a bit inconvenient for me. Guys, what do you think?

Regardless of the test engine issues which I have to address I think the
series should be merged since it closes real bugs.

---

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.git console-fix-1

for you to fetch changes up to 9236f677fcf1bde39f9eb004693865c40b449abc:

  box/console: Provide console.eos() api (2019-08-30 23:46:32 +0300)

----------------------------------------------------------------
Cyrill Gorcunov (5):
      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

 src/box/lua/console.lua | 129 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------
 1 file changed, 116 insertions(+), 13 deletions(-)

             reply	other threads:[~2019-08-30 21:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-30 21:48 Cyrill Gorcunov [this message]
2019-08-30 21:48 ` [tarantool-patches] [PATCH 1/5] box/console: Add mapping for direct symbols Cyrill Gorcunov
     [not found]   ` <20190903082351.GB9438@atlas>
2019-09-03  8:26     ` [tarantool-patches] " Cyrill Gorcunov
     [not found]   ` <20190903082446.GC9438@atlas>
2019-09-03  8:28     ` Cyrill Gorcunov
2019-08-30 21:48 ` [tarantool-patches] [PATCH 2/5] box/console: Add explicit output EOS mapping Cyrill Gorcunov
     [not found]   ` <20190903082725.GD9438@atlas>
2019-09-03  8:32     ` [tarantool-patches] " Cyrill Gorcunov
2019-08-30 21:48 ` [tarantool-patches] [PATCH 3/5] box/console: Refactor command handling Cyrill Gorcunov
2019-08-30 21:48 ` [tarantool-patches] [PATCH 4/5] box/console: Fix hang in remote console lua mode Cyrill Gorcunov
     [not found]   ` <20190903190002.GC15611@atlas>
2019-09-03 19:18     ` [tarantool-patches] " Cyrill Gorcunov
     [not found]       ` <20190904064657.GD30636@atlas>
2019-09-04  7:12         ` Cyrill Gorcunov
2019-08-30 21:48 ` [tarantool-patches] [PATCH 5/5] box/console: Provide console.eos() api Cyrill Gorcunov
     [not found]   ` <20190903190057.GD15611@atlas>
2019-09-03 19:19     ` [tarantool-patches] " Cyrill Gorcunov
     [not found]       ` <20190904064725.GE30636@atlas>
2019-09-04  7:12         ` Cyrill Gorcunov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190830214808.17422-1-gorcunov@gmail.com \
    --to=gorcunov@gmail.com \
    --cc=alexander.turenko@tarantool.org \
    --cc=kostja@tarantool.org \
    --cc=kyukhin@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [tarantool-patches] [PATCH v2 0/5] box/console: Improve lua mode for remote console' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox