From: Konstantin Osipov <kostja@tarantool.org>
To: tarantool-patches@freelists.org
Cc: Georgy Kirichenko <georgy@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH v4 8/9] applier: apply transaction in parallel
Date: Thu, 20 Jun 2019 11:06:27 +0300 [thread overview]
Message-ID: <20190620080627.GH15155@atlas> (raw)
In-Reply-To: <f992314b44da680c3c9c17c879b715661fccf63a.1560978655.git.georgy@tarantool.org>
* Georgy Kirichenko <georgy@tarantool.org> [19/06/20 09:54]:
> applier_apply_tx(struct stailq *rows)
> {
> + struct xrow_header *first_row =
> + &stailq_first_entry(rows, struct applier_tx_row,
> + next)->row;
> + struct replica *replica = replica_by_id(first_row->replica_id);
> + struct latch *latch = (replica ? &replica->order_latch :
> + &replicaset.applier.order_latch);
> + latch_lock(latch);
Now that we have a sequencer shouldn't it handle the job of this
latch as well?
> + if (vclock_get(&replicaset.applier.net_vclock, first_row->replica_id) >=
> + first_row->lsn) {
> + /* Check there is a heathbeat message and wake a writers up. */
> + if (first_row->lsn == 0)
> + fiber_cond_broadcast(&replicaset.applier.commit_cond);
> + latch_unlock(latch);
> + return 0;
> + }
> +
> + /*
> + * A vclock of the last transaction wich was read
> + * from an applier connection.
> + */
> + struct vclock net_vclock;
> + /* Signaled on replicated transaction commit. */
I don't understand this comment, what is a replicated transaction
commit? Could you please rephrase? Why do you need this cond?
Please add more comments explaining how and why.
> + struct fiber_cond commit_cond;
> + /*
> + * Trigger to fire when replication stops in case
> + * of an error.
> + */
> + struct rlist on_replication_fail;
I would simply call it on_error on_failure. It's already clear it's related to the
applier work. Please explain how and why
this trigger is used in the comment.
> + /* Diag to populate an error acros all appliers. */
> + struct diag diag;
> } applier;
> /** Map of all known replica_id's to correspponding replica's. */
> struct replica **replica_by_id;
--
Konstantin Osipov, Moscow, Russia
next prev parent reply other threads:[~2019-06-20 8:06 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-19 21:23 [tarantool-patches] [PATCH v4 0/9] Parallel applier Georgy Kirichenko
2019-06-19 21:23 ` [tarantool-patches] [PATCH v4 1/9] txn: handle fiber stop event at transaction level Georgy Kirichenko
2019-06-20 7:28 ` [tarantool-patches] " Konstantin Osipov
2019-06-20 11:39 ` [tarantool-patches] " Vladimir Davydov
2019-06-19 21:23 ` [tarantool-patches] [PATCH v4 2/9] core: latch_steal routine Georgy Kirichenko
2019-06-20 7:28 ` [tarantool-patches] " Konstantin Osipov
2019-06-20 11:53 ` [tarantool-patches] " Vladimir Davydov
2019-06-20 20:34 ` Георгий Кириченко
2019-06-19 21:23 ` [tarantool-patches] [PATCH v4 3/9] txn: get rid of autocommit from a txn structure Georgy Kirichenko
2019-06-20 7:32 ` [tarantool-patches] " Konstantin Osipov
2019-06-20 11:52 ` [tarantool-patches] " Vladimir Davydov
2019-06-20 20:16 ` Георгий Кириченко
2019-06-19 21:23 ` [tarantool-patches] [PATCH v4 4/9] txn: get rid of fiber_gc from txn_rollback Georgy Kirichenko
2019-06-20 7:43 ` [tarantool-patches] " Konstantin Osipov
2019-06-20 20:35 ` Георгий Кириченко
2019-06-20 13:03 ` [tarantool-patches] " Vladimir Davydov
2019-06-20 20:16 ` Георгий Кириченко
2019-06-19 21:23 ` [tarantool-patches] [PATCH v4 5/9] wal: a dedicated wal scheduling fiber Georgy Kirichenko
2019-06-20 7:53 ` [tarantool-patches] " Konstantin Osipov
2019-06-20 13:05 ` [tarantool-patches] " Vladimir Davydov
2019-06-19 21:23 ` [tarantool-patches] [PATCH v4 6/9] wal: introduce a journal entry finalization callback Georgy Kirichenko
2019-06-20 7:56 ` [tarantool-patches] " Konstantin Osipov
2019-06-20 14:08 ` [tarantool-patches] " Vladimir Davydov
2019-06-20 20:22 ` Георгий Кириченко
2019-06-21 7:26 ` [tarantool-patches] " Konstantin Osipov
2019-06-19 21:23 ` [tarantool-patches] [PATCH v4 7/9] txn: introduce asynchronous txn commit Georgy Kirichenko
2019-06-20 8:01 ` [tarantool-patches] " Konstantin Osipov
2019-06-20 15:00 ` [tarantool-patches] " Vladimir Davydov
2019-06-21 7:28 ` [tarantool-patches] " Konstantin Osipov
2019-06-19 21:23 ` [tarantool-patches] [PATCH v4 8/9] applier: apply transaction in parallel Georgy Kirichenko
2019-06-20 7:41 ` [tarantool-patches] " Георгий Кириченко
2019-06-20 8:07 ` Konstantin Osipov
2019-06-20 16:37 ` Vladimir Davydov
2019-06-20 20:33 ` Георгий Кириченко
2019-06-21 8:36 ` Vladimir Davydov
2019-06-20 8:06 ` Konstantin Osipov [this message]
2019-06-19 21:23 ` [tarantool-patches] [PATCH v4 9/9] test: fix flaky test Georgy Kirichenko
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=20190620080627.GH15155@atlas \
--to=kostja@tarantool.org \
--cc=georgy@tarantool.org \
--cc=tarantool-patches@freelists.org \
--subject='[tarantool-patches] Re: [PATCH v4 8/9] applier: apply transaction in parallel' \
/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