Tarantool development patches archive
 help / color / mirror / Atom feed
From: Serge Petrenko <sergepetrenko@tarantool.org>
To: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: tarantool-patches@freelists.org
Subject: Re: [tarantool-patches] [PATCH] tarantoolctl: fix cat and play for empty body requests
Date: Fri, 14 Sep 2018 17:39:59 +0300	[thread overview]
Message-ID: <2BFFE4CA-A048-4F18-9D6E-824C518D5AE1@tarantool.org> (raw)
In-Reply-To: <20180913130441.36cmydekkvsjikyb@esperanza>



> 13 сент. 2018 г., в 16:04, Vladimir Davydov <vdavydov.dev@gmail.com> написал(а):
> 
> On Tue, Sep 11, 2018 at 07:15:06PM +0300, Serge Petrenko wrote:
>> If space.before_replace returns the old tuple, the operation turns into
>> no-op, but is still written to WAL as IPROTO_NOP for the sake of
>> replication. Such a request doesn't have a body, and tarantoolctl failed
>> to parse such requests in `tarantoolctl cat` and `tarantoolctl play`.
>> Fix this by skipping such requests, since they have no effect anyway.
>> 
>> Closes #3675
>> ---
>> https://github.com/tarantool/tarantool/issues/3675
>> https://github.com/tarantool/tarantool/tree/sp/gh-3675-tarantoolctl-cat-empty-body
>> 
>> extra/dist/tarantoolctl.in | 18 ++++++++++++------
>> 1 file changed, 12 insertions(+), 6 deletions(-)
> 
> Please add a test.
> 
>> 
>> 
>> +            end
> 
> Nit:
> 
>  local sid = record.BODY and record.BODY.space_id
> 
>>             local rid = record.HEADER.replica_id
>> -            if (lsn < from) or
>> +            if (lsn < from) or sid == nil or
> 
> I want to see BODY-less requests in the output while this code makes
> tarantoolctl-cat ignore them AFAIU.
> 
>>                (not spaces and sid and sid < 512 and not show_system) or
>> 
>> -            if (lsn < from) or
>> +            if (lsn < from) or sid == nil or
>>                (not spaces and sid and sid < 512 and not show_system) or
>> -               (spaces and (sid == nil or not find_in_list(sid, spaces))) or
>> +               (spaces and not find_in_list(sid, spaces)) or
>>                (replicas and not find_in_list(rid, replicas)) then
>>                 -- pass this tuple
>>             elseif lsn >= to then
> 

Hi! I fixed all your comments and resent the patch as a part of a patchset together with
a patch regarding #3678.

      reply	other threads:[~2018-09-14 14:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-11 16:15 Serge Petrenko
2018-09-13 13:04 ` Vladimir Davydov
2018-09-14 14:39   ` Serge Petrenko [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=2BFFE4CA-A048-4F18-9D6E-824C518D5AE1@tarantool.org \
    --to=sergepetrenko@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=vdavydov.dev@gmail.com \
    --subject='Re: [tarantool-patches] [PATCH] tarantoolctl: fix cat and play for empty body requests' \
    /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