From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: Serge Petrenko <sergepetrenko@tarantool.org>
Cc: tarantool-patches@freelists.org, kostja@tarantool.org
Subject: Re: [PATCH] xrow: improve corrupted header logging on an error
Date: Sun, 7 Apr 2019 14:45:59 +0300 [thread overview]
Message-ID: <20190407114559.cqkbdexc74qmcunm@esperanza> (raw)
In-Reply-To: <20190405160918.17305-1-sergepetrenko@tarantool.org>
On Fri, Apr 05, 2019 at 07:09:17PM +0300, Serge Petrenko wrote:
> Improve row printing to log. Since say only has 16k buffer, there is no
> point in printing the whole packet, which can have arbitrary length, in one
> go.
> So, print the header row by row, 16 bytes in a row, and format output to
> match `xxd` output:
> ```
> [001] 2019-04-05 18:22:46.679 [11859] iproto V> Got a corrupted row:
> [001] 2019-04-05 18:22:46.679 [11859] iproto V> 00000000: A3 02 D6 5A E4 D9 E7 68 A1 53 8D 53 60 5F 20 3F
> [001] 2019-04-05 18:22:46.679 [11859] iproto V> 00000010: D8 E2 D6 E2 A3 02 D6 5A E4 D9 E7 68 A1 53 8D 53
> ```
> Now we can get rid of malloc, and use a preallocated tt_static_buf
> instead.
> Also, replace a big macro with a small macro and a helper function.
Looks awesome, thanks! Pushed to master, 2.1, and 1.10.
It's a shame we didn't think about multiline output ourselves until
Kostja suggested it :(
prev parent reply other threads:[~2019-04-07 11:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-05 16:09 Serge Petrenko
2019-04-07 11:45 ` Vladimir Davydov [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=20190407114559.cqkbdexc74qmcunm@esperanza \
--to=vdavydov.dev@gmail.com \
--cc=kostja@tarantool.org \
--cc=sergepetrenko@tarantool.org \
--cc=tarantool-patches@freelists.org \
--subject='Re: [PATCH] xrow: improve corrupted header logging on an error' \
/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