Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Cyrill Gorcunov <gorcunov@gmail.com>,
	tml <tarantool-patches@dev.tarantool.org>
Cc: Mons Anderson <v.perepelitsa@corp.mail.ru>
Subject: Re: [Tarantool-patches] [RFC] qsync: provide box.info interface for monitoring
Date: Wed, 17 Feb 2021 22:01:03 +0100	[thread overview]
Message-ID: <dcbbd28f-aa19-f8f9-6a9b-237450076ee5@tarantool.org> (raw)
In-Reply-To: <20210212080324.274627-1-gorcunov@gmail.com>

Hi! Thanks for the patch!

> Guys, I didn't put is anywhere yet, because I would like
> to gather comments on design, so not for merge.
> 1) Vlad pointed that we might have several limbo instances
> in future. Should I start printing limbos as map initially,
> say
> 	synchro:
> 	  limbo:
> 	    1:
> 	      qlen: 0
> 	      owner_id: 0
> 	    2:
> 	      qlen: 0
> 	      owner_id: 0

I am not sure 'limbo' name should be exposed. It is an
internal term. Also it looks strange to shorten 'queue len'
to 'qlen', but leave 'owner id' as is.

Besides, what is 'owner_id'? Don't synchro.limbo indexes
mean owner ids?

In future if we will have many limbos, they will belong to
one instance each. No ownwership transfers AFAIU. That is
the whole idea.

Perhaps a better naming would be this:

	      len/length: <number>
          quorum: <number>

There is only one key now in each queue, but more may be
added in future, so I wouldn't flatten it.

Another problem I see - to get your own limbo you need to
know your instance id. So to get the stat you need to do the
ugly thing:

	mystat = box.info.synchro.queue[box.info.id]

Maybe it is not that bad though. I don't use monitoring so
can't tell. But would probably be nice to have


which would reference the same Lua table as used in
box.info.synchro.queue with the local id.

> where 1 and 2 gonna be either plain enumeration of limbo
> instances?
> 2) Vlad, could you please comment which else values we
> need for better testing?

For testing the queue length and quorum value are enough
I hope.

> 3) Mons, could you please think through what else parameters
> are might be needed for solutions team?
> 4) Any other ideas are highly appreciated!

I advise to ask the same questions to Vlad Grubov. He is
going to use it in prod.

> diff --git a/src/box/txn_limbo.h b/src/box/txn_limbo.h
> index c28b5666d..43505e7a2 100644
> --- a/src/box/txn_limbo.h
> +++ b/src/box/txn_limbo.h
> @@ -94,6 +94,10 @@ struct txn_limbo {
>  	 * them LSNs in the same order.
>  	 */
>  	struct rlist queue;
> +	/**
> +	 * Number of entries in limbo queue.
> +	 */
> +	int64_t qlen;

Maybe just call it 'size'? Or 'length'? Limbo is
the queue itself. So it looks like 'queue.qlen', which
sounds tautological.

>  	/**
>  	 * Instance ID of the owner of all the transactions in the
>  	 * queue. Strictly speaking, nothing prevents to store not

      reply	other threads:[~2021-02-17 21:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-12  8:03 Cyrill Gorcunov via Tarantool-patches
2021-02-17 21:01 ` Vladislav Shpilevoy via Tarantool-patches [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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dcbbd28f-aa19-f8f9-6a9b-237450076ee5@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=gorcunov@gmail.com \
    --cc=v.perepelitsa@corp.mail.ru \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [RFC] qsync: provide box.info interface for monitoring' \


* 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