Tarantool development patches archive
 help / color / mirror / Atom feed
From: Alexander Turenko <alexander.turenko@tarantool.org>
To: Sergey Voinov <sergeiv@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH] Add console.print() alias for box.session.push()
Date: Tue, 17 Dec 2019 17:11:19 +0300	[thread overview]
Message-ID: <20191217141119.siiy67yzt5zw32wd@tkn_work_nb> (raw)
In-Reply-To: <20191216235413.knmpld2poafxhg7m@tkn_work_nb>

> > +--
> > +-- Alias for box.session.push
> > +--
> > +local function print(message, sync)
> 
> <...>
>
> 'sync' is not used here, see console_session_push() comment:
> 
>  | /**
>  |  * Push a tagged YAML document into a console socket.
>  |  * @param session Console session.
>  |  * @param sync Unused request sync.
>  |  * @param port Port with YAML to push.
>  |  *
>  |  * @retval  0 Success.
>  |  * @retval -1 Error.
>  |  */
>  | static int
>  | console_session_push(struct session *session, uint64_t sync, struct port *port)
> 
> Your last test case shows it: we pass some random 'sync', but anyway
> receive a push from a console. The parameter exists, because
> box.session.push() API is general mechanism. It just ignored for 'repl'
> and 'console' sessions (see [2]).
> 
> Since console.print() is console specific rather then general I don't
> see a reason to support 'sync' argument here. Moreover I would restrict
> it for 'repl' and 'console' sessions: let's make it no-op otherwise
> (because debug prints should not raise an error IMHO).

FYI: I filed https://github.com/tarantool/tarantool/issues/4689 to
remove `sync` argument from box.sesison.push().

WBR, Alexander Turenko.

      reply	other threads:[~2019-12-17 14:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-05 15:53 Sergey Voinov
2019-12-05 16:16 ` Cyrill Gorcunov
2019-12-16 23:54 ` Alexander Turenko
2019-12-17 14:11   ` Alexander Turenko [this message]

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=20191217141119.siiy67yzt5zw32wd@tkn_work_nb \
    --to=alexander.turenko@tarantool.org \
    --cc=sergeiv@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH] Add console.print() alias for box.session.push()' \
    /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