From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: Sergey Ostanevich <sergos@tarantool.org>,
Oleg Babin <olegrok@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org, alexander.turenko@tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v2] core: handle fiber cancellation for fiber.cond
Date: Mon, 16 Nov 2020 23:12:46 +0100 [thread overview]
Message-ID: <eeb3d266-6480-8e6a-59cf-0bed5b428c79@tarantool.org> (raw)
In-Reply-To: <20201103102018.GC517@tarantool.org>
On 03.11.2020 11:20, Sergey Ostanevich wrote:
> Hi Oleg!
>
> I believe the point about 'consistency' is not valid here. I put a
> simple check that if diag is already set, then print it out. For the
> fiber_cond_wait_timeout() it happened multiple times with various
> reports, inlcuding this one:
>
> 2020-11-03 10:28:01.630 [72411] relay/unix/:(socket)/101/main C> Did not
> set the DIAG to FiberIsCancelled, original diag: Missing .xlog file
> between LSN 5 {1: 5} and 6 {1: 6}
>
> that is used in the test system:
>
> test_run:wait_upstream(1, {message_re = 'Missing %.xlog file', status =
> 'loading'})
>
> So, my resolution will be: it is wrong to set a diag in an arbitrary
> place, without clear understanting of the reason. This is the case for
> the cond_wait machinery, since it doesn't know _why_ the fiber is
> cancelled.
It is a wrong resolution, IMO. You just hacked cond wait not to change the
other places. It is not about tests. Tests only show what is provided by the
internal subsystems. And if they depend on fiber cond not setting diag in
case of a fail, then it looks wrong.
I suggest you to fix the usage places, where the caller code thinks that
cond_wait never sets a diag on cancellation.
If a function fails, we set a diag. It is not a thing we do optionally.
Otherwise you make it a bit simpler in this patch, but make it harder to
work with the cond in future.
Talking of your statement:
I believe the stack diag also is not supported there yet.
It is supported on the level of lib/core, i.e. everywhere. But is not
present on 1.10. However it is not the point. The point is that it is not
needed here.
next prev parent reply other threads:[~2020-11-16 22:12 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-31 16:29 sergos
2020-11-01 10:13 ` Oleg Babin
2020-11-03 10:20 ` Sergey Ostanevich
2020-11-03 10:27 ` Oleg Babin
2020-11-04 10:00 ` Leonid Vasiliev
2020-11-16 22:12 ` Vladislav Shpilevoy [this message]
2020-11-18 22:05 ` Sergey Ostanevich
2020-11-22 16:01 ` Vladislav Shpilevoy
2020-11-23 21:47 ` Sergey Ostanevich
2020-11-24 7:31 ` Sergey Ostanevich
2020-11-04 10:00 ` Leonid Vasiliev
2020-11-05 20:42 ` Sergey Ostanevich
2020-11-10 21:16 ` Sergey Ostanevich
2020-11-12 20:15 ` Sergey Ostanevich
2020-11-13 8:26 ` Leonid Vasiliev
2020-11-30 22:49 ` Alexander Turenko
2020-11-16 22:12 ` Vladislav Shpilevoy
2020-11-25 21:32 ` Vladislav Shpilevoy
2020-11-29 21:41 ` Sergey Ostanevich
2020-11-30 21:46 ` Alexander Turenko
2020-11-30 21:01 ` Vladislav Shpilevoy
2020-12-02 10:58 ` Alexander V. Tikhonov
2020-12-02 22:18 ` 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=eeb3d266-6480-8e6a-59cf-0bed5b428c79@tarantool.org \
--to=v.shpilevoy@tarantool.org \
--cc=alexander.turenko@tarantool.org \
--cc=olegrok@tarantool.org \
--cc=sergos@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH v2] core: 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