[Tarantool-patches] [PATCH] lua: handle fiber cancellation for fiber.cond
Sergey Ostanevich
sergos at tarantool.org
Thu Oct 29 20:14:37 MSK 2020
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?
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 at tarantool.org wrote:
> > From: Sergey Ostanevich <sergos at 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 at 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().
> > ---
> >
More information about the Tarantool-patches
mailing list