From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: Nikita Pettik <korablev@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH 2/2] vinyl: skip invalid upserts during squash
Date: Thu, 21 May 2020 00:13:06 +0200 [thread overview]
Message-ID: <6ab06c70-59fe-57c0-a989-7c52574f89bb@tarantool.org> (raw)
In-Reply-To: <20200519181824.GA13813@tarantool.org>
Thanks for the fixes!
>> On 14/05/2020 04:21, Nikita Pettik wrote:
>>> On 01 May 02:31, Vladislav Shpilevoy wrote:
>>>> Hi! Thanks for the patch!
>>>>
>>>> Firstly, Kostja left some comments here. Would be cool to address them.
>>>
>>> Done (sorry, I did not ignore them, just had to work on other more vital bugs).
>>>
>>>> Secondly, here is my personal opinion. I don't like just skipping things
>>>> a user committed without any error appearing in the application. IMO, we
>>>> should apply only the first commit. And let a user see this error so as he
>>>> could notice the problem. To fix reads he could do delete() of the bad key.
>>>
>>> The problem with delete it leaves user no way to restore the rest
>>> of upsert history. Moreover, these upserts will get stuck until
>>> user finds in logs corresponding error (I guess we can't abort
>>> compaction due to invalid upserts).
>>>
>>>> However, how a user will be able to find the exact broken key - I don't
>>>> know. Maybe the ignore + logging is better.
>>>
>>> Why can't we just log broken key? E.g. see logs in vy_apply_upsert().
>>
>> We can log it. This is what you do in this patchset.
>>
>> I also noticed, that you skip the failed upsert in case of any error.
>> Even if it is an OOM, not related to format problems. I think it is safer
>> to check error type, and skip it only in case of a ClientError.
>
> Personally I don't like relying on error type, but this pattern is
> already in the source code (e.g. upsert_do_ops), so here's diff:
Yeah, I agree. Error type is rather a crutch. And should be used only
in userspace code. As an alternative, you can add an out parameter
to vy_apply_upsert(), 'is_format_invalid' or something like this,
and set it to true in case of tuple_validate_raw() error. Set to false
for any other errors.
However error type solution also looks ok, so up to you.
next prev parent reply other threads:[~2020-05-20 22:13 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-13 21:55 [Tarantool-patches] [PATCH 0/2] Validate result of upserts squash & skip invalid upserts which can't be applied Nikita Pettik
2020-04-13 21:55 ` [Tarantool-patches] [PATCH 1/2] vinyl: validate resulting tuple after upsert is applied Nikita Pettik
2020-06-22 19:28 ` Aleksandr Lyapunov
2020-04-13 21:55 ` [Tarantool-patches] [PATCH 2/2] vinyl: skip invalid upserts during squash Nikita Pettik
2020-04-13 22:12 ` Konstantin Osipov
2020-05-14 2:11 ` Nikita Pettik
2020-05-14 6:56 ` Konstantin Osipov
2020-05-19 19:10 ` Nikita Pettik
2020-05-19 19:39 ` Konstantin Osipov
2020-05-21 2:51 ` Nikita Pettik
2020-05-21 8:36 ` Konstantin Osipov
2020-05-01 0:31 ` Vladislav Shpilevoy
2020-05-14 2:21 ` Nikita Pettik
2020-05-14 21:32 ` Vladislav Shpilevoy
2020-05-19 18:18 ` Nikita Pettik
2020-05-20 22:13 ` Vladislav Shpilevoy [this message]
2020-05-26 21:33 ` Vladislav Shpilevoy
2020-05-27 20:05 ` Nikita Pettik
2020-05-29 21:47 ` Vladislav Shpilevoy
2020-06-01 19:24 ` Nikita Pettik
2020-05-20 22:13 ` [Tarantool-patches] [PATCH 0/2] Validate result of upserts squash & skip invalid upserts which can't be applied Vladislav Shpilevoy
2020-05-22 2:42 ` Nikita Pettik
2020-05-26 21:33 ` Vladislav Shpilevoy
2020-05-27 20:10 ` Nikita Pettik
2020-06-22 14:13 ` Aleksandr Lyapunov
2020-06-22 20:21 ` Nikita Pettik
2020-06-23 12:32 ` Aleksandr Lyapunov
2020-06-02 21:36 ` Vladislav Shpilevoy
2020-06-02 21:37 ` Vladislav Shpilevoy
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=6ab06c70-59fe-57c0-a989-7c52574f89bb@tarantool.org \
--to=v.shpilevoy@tarantool.org \
--cc=korablev@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH 2/2] vinyl: skip invalid upserts during squash' \
/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