Tarantool development patches archive
 help / color / mirror / Atom feed
From: Oleg Babin <olegrok@tarantool.org>
To: Sergey Ostanevich <sergos@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org, alexander.turenko@tarantool.org
Subject: Re: [Tarantool-patches] [PATCH] lua: handle fiber cancellation for fiber.cond
Date: Fri, 30 Oct 2020 09:47:53 +0300	[thread overview]
Message-ID: <b26e327a-c292-124e-6bb0-8166cff60fc9@tarantool.org> (raw)
In-Reply-To: <20201029171437.GA517@tarantool.org>


On 29/10/2020 20:14, Sergey Ostanevich wrote:
> Hi Oleg!
>
> Thanks for the comment, I believe I have to resend the patch along with
> C API changes.
>
> What I see at the moment - failures like
>
> [076]  test_run:wait_upstream(1, {message_re = 'Missing %.xlog file',
> status = 'loading'})
> [076]  ---
> [076] -- true
> [076] +- false
>
> which incurred by the intended behavior change, AFAIU. We no longer
> return 'true' in case the fiber is cancelled. The wait_upstream returns
> the cond wait result, hence the output differs.
>
> Did you observe any other failures?


Yes, seems something goes wrong with "applier" status. It looks like 
behaviour change.

[018] xlog/panic_on_wal_error.test.lua                                [ 
fail ]
[018]
[018] Test failed! Result content mismatch:
[018] --- xlog/panic_on_wal_error.result    Sun Sep  6 06:00:02 2020
[018] +++ xlog/panic_on_wal_error.reject    Sun Sep  6 06:05:59 2020
[018] @@ -134,14 +134,18 @@
[018]  ...
[018]  while box.info.replication[1].upstream.status ~= "stopped" do 
fiber.sleep(0.001) end
[018]  ---
[018] +- error: '[string "while 
box.info.replication[1].upstream.status..."]:1: attempt to
[018] +    index field ''upstream'' (a nil value)'
[018]  ...
[018]  box.info.replication[1].upstream.status
[018]  ---
[018] -- stopped
[018] +- error: '[string "return box.info.replication[1].upstream.status 
"]:1: attempt to
[018] +    index field ''upstream'' (a nil value)'
[018]  ...
[018]  box.info.replication[1].upstream.message
[018]  ---
[018] -- 'Missing .xlog file between LSN 6 {1: 6} and 8 {1: 8}'
[018] +- error: '[string "return 
box.info.replication[1].upstream.message "]:1: attempt to
[018] +    index field ''upstream'' (a nil value)'
[018]  ...
[018]  box.space.test:select{}


Also see https://travis-ci.org/github/tarantool/tarantool/jobs/724596598

> Regards,
> Sergos
>
>
> On 28 окт 20:14, Oleg Babin wrote:
>> Hi! Thanks for the patch!
>>
>> The main reason I didn't send this patch is inconsistency between Lua and C
>> API.
>>
>> To eliminate such inconsistency [1] was implemented. Unfortunately some test
>> fails and I've failed to find root of the problem.
>>
>> However I still believe that the problem should be solved at "core" level.
>>
>> Anyway, it would be great if some solution will be pushed to upstream.
>>
>>
>> [1] https://github.com/tarantool/tarantool/commit/e7a5120603f362364953315d31aa529342263e0b
>>
>>
>> On 28/10/2020 19:22, sergos@tarantool.org wrote:
>>> From: Sergey Ostanevich <sergos@tarantool.org>
>>>
>>> Before this patch fiber.cond():wait() just returns for cancelled
>>> fiber. In contrast fiber.channel():get() threw "fiber is
>>> canceled" error.
>>> This patch unify behaviour of channels and condvars and also fixes
>>> related net.box module problem - it was impossible to interrupt
>>> net.box call with fiber.cancel because it used fiber.cond under
>>> the hood. Test cases for both bugs are added.
>>>
>>> Closes #4834
>>> Closes #5013
>>>
>>> Co-authored-by: Oleg Babin <olegrok@tarantool.org>
>>>
>>> @TarantoolBot document
>>> Title: fiber.cond():wait() throws if fiber is cancelled
>>>
>>> Currently fiber.cond():wait() throws an error if waiting fiber is
>>> cancelled like in case with fiber.channel():get().
>>> ---
>>>

      parent reply	other threads:[~2020-10-30  6:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-28 16:22 sergos
2020-10-28 17:14 ` Oleg Babin
2020-10-29 17:14   ` Sergey Ostanevich
2020-10-29 18:06     ` Alexander Turenko
2020-10-30  6:47     ` Oleg Babin [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=b26e327a-c292-124e-6bb0-8166cff60fc9@tarantool.org \
    --to=olegrok@tarantool.org \
    --cc=alexander.turenko@tarantool.org \
    --cc=sergos@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH] lua: handle fiber cancellation for fiber.cond' \
    /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