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>
Cc: tml <tarantool-patches@dev.tarantool.org>
Subject: Re: [Tarantool-patches] [PATCH v8 3/6] limbo: gather promote tracking into a separate structure
Date: Thu, 29 Jul 2021 00:07:44 +0200	[thread overview]
Message-ID: <5f0235c4-628c-f29b-097a-48f7203320cd@tarantool.org> (raw)
In-Reply-To: <YQHS0D7ta/rjEZUJ@grain>

On 28.07.2021 23:57, Cyrill Gorcunov wrote:
> On Wed, Jul 28, 2021 at 11:34:43PM +0200, Vladislav Shpilevoy wrote:
>> Hi! Thanks for the patch!
>>
>> On 26.07.2021 17:34, Cyrill Gorcunov via Tarantool-patches wrote:
>>> It is needed to introduce ordered promote related data
>>> modifications in next patch.
>>
>> Why do you need this new struct? While I like the new names
>> (the old promote_greatest_term was super long), I don't see
>> any motivation to extract the members into a new struct.
>> It is still used only inside of the limbo as a member.
>>
>> I suppose this might be a leftover from the old versions of
>> the patchset. Please, try to keep these members inside of
>> the limbo like they were.
> 
> The key moment here is the locking we use for terms tracking,
> note the locking is not covering the whole limbo thus better
> to keep the lock itself inside the structure it protects I think.

Yes, the struct it protects is the limbo. Part of. I see no sense
to extract the members you protect into a new struct just because
only they are protected.

Take cbus_endpoint for instance. It has a mutex, and it is locked
to push/pop new messages into a queue. It is taken to touch the
queue. But it does not mean you need struct cbus_endpoint_queue
for that. The struct you created is very artificial, it has no
purpose outside of the limbo and there can't be multiple of these
structs. Which makes it pointless. It only complicates the patch.

It has no its own methods except 'create()', has no 'destroy()',
all its access goes through txn_limbo methods, even the lock is
stored in the limbo, not in this struct, which contradicts with
what you said above.

  reply	other threads:[~2021-07-28 22:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-26 15:34 [Tarantool-patches] [PATCH v8 0/6] limbo: implement packets filtering Cyrill Gorcunov via Tarantool-patches
2021-07-26 15:34 ` [Tarantool-patches] [PATCH v8 1/6] latch: add latch_is_locked helper Cyrill Gorcunov via Tarantool-patches
2021-07-26 15:34 ` [Tarantool-patches] [PATCH v8 2/6] say: introduce panic_on helper Cyrill Gorcunov via Tarantool-patches
2021-07-26 15:34 ` [Tarantool-patches] [PATCH v8 3/6] limbo: gather promote tracking into a separate structure Cyrill Gorcunov via Tarantool-patches
2021-07-28 21:34   ` Vladislav Shpilevoy via Tarantool-patches
2021-07-28 21:57     ` Cyrill Gorcunov via Tarantool-patches
2021-07-28 22:07       ` Vladislav Shpilevoy via Tarantool-patches [this message]
2021-07-29  6:40         ` Cyrill Gorcunov via Tarantool-patches
2021-07-26 15:34 ` [Tarantool-patches] [PATCH v8 4/6] limbo: order access to the limbo terms terms Cyrill Gorcunov via Tarantool-patches
2021-07-26 15:34 ` [Tarantool-patches] [PATCH v8 5/6] limbo: filter incoming synchro requests Cyrill Gorcunov via Tarantool-patches
2021-07-26 15:34 ` [Tarantool-patches] [PATCH v8 6/6] test: replication -- add gh-6036-rollback-confirm Cyrill Gorcunov via Tarantool-patches

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=5f0235c4-628c-f29b-097a-48f7203320cd@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=gorcunov@gmail.com \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v8 3/6] limbo: gather promote tracking into a separate structure' \
    /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