From: Serge Petrenko <sergepetrenko@tarantool.org> To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> Cc: tml <tarantool-patches@dev.tarantool.org> Subject: Re: [Tarantool-patches] [PATCH v6 2/3] gc: rely on minimal vclock components instead of signatures Date: Mon, 13 Apr 2020 13:12:19 +0300 [thread overview] Message-ID: <2A3984D7-8126-4884-BFCA-E564B76B9B01@tarantool.org> (raw) In-Reply-To: <bd6fa57f-3ee7-be36-bd70-cc9fc37a279a@tarantool.org> > 11 апр. 2020 г., в 19:04, Vladislav Shpilevoy <v.shpilevoy@tarantool.org> написал(а): > > Hi! Thanks for the answers! Hi! Thanks for the review! > > gc_add_checkpoint() and gc_consumer_advance() still use sum(). > Is it ok? gc_add_checkpoint() is fine. It’s ok to compare checkpoints by signature, they’re in a list in the order of creation, which is the same as order by vclock signature. > > I see gc_consumer_advance() compares vclocks of two neighbour > consumers using sum() to check tree's invariant, even though > the invariant is not related to sum() anymore. Missed that one too, thanks! diff --git a/src/box/gc.c b/src/box/gc.c index 36b2d7f4e..cbcdf7d12 100644 --- a/src/box/gc.c +++ b/src/box/gc.c @@ -580,7 +580,7 @@ gc_consumer_advance(struct gc_consumer *consumer, const struct vclock *vclock) */ struct gc_consumer *next = gc_tree_next(&gc.consumers, consumer); bool update_tree = (next != NULL && - signature >= vclock_sum(&next->vclock)); + vclock_lex_compare(vclock, &next->vclock) >= 0); if (update_tree) gc_tree_remove(&gc.consumers, consumer); > > Please, check all the other vclock_sum() invocations too, > just in case. Other cases are fine. -- Serge Petrenko sergepetrenko@tarantool.org
next prev parent reply other threads:[~2020-04-13 10:12 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-07 15:49 [Tarantool-patches] [PATCH v6 0/3] replication: fix local space tracking Serge Petrenko 2020-04-07 15:49 ` [Tarantool-patches] [PATCH v6 1/3] replication: omit 0-th vclock component in replication responses Serge Petrenko 2020-04-09 23:08 ` Vladislav Shpilevoy 2020-04-10 12:25 ` Serge Petrenko 2020-04-11 16:05 ` Vladislav Shpilevoy 2020-04-13 10:12 ` Serge Petrenko 2020-04-07 15:49 ` [Tarantool-patches] [PATCH v6 2/3] gc: rely on minimal vclock components instead of signatures Serge Petrenko 2020-04-09 23:08 ` Vladislav Shpilevoy 2020-04-10 12:25 ` Serge Petrenko 2020-04-11 16:04 ` Vladislav Shpilevoy 2020-04-13 10:12 ` Serge Petrenko [this message] 2020-04-07 15:49 ` [Tarantool-patches] [PATCH v6 3/3] box: start counting local space requests separately Serge Petrenko 2020-04-13 14:38 ` [Tarantool-patches] [PATCH v6 0/3] replication: fix local space tracking Vladislav Shpilevoy 2020-04-16 13:49 ` Kirill Yukhin
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=2A3984D7-8126-4884-BFCA-E564B76B9B01@tarantool.org \ --to=sergepetrenko@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH v6 2/3] gc: rely on minimal vclock components instead of signatures' \ /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