From: Konstantin Osipov <kostja@tarantool.org>
To: tarantool-patches@freelists.org
Cc: Georgy Kirichenko <georgy@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH 1/2] Introduce a txn memory region
Date: Wed, 10 Apr 2019 13:11:48 +0300 [thread overview]
Message-ID: <20190410101148.GL8268@chai> (raw)
In-Reply-To: <75597e590276ca833b38aec0bee1f008f081271d.1554880565.git.georgy@tarantool.org>
* Georgy Kirichenko <georgy@tarantool.org> [19/04/10 10:26]:
> Attach a separate memory region for each txn structure in order to store
> all txn internal data until the transaction finished. This patch is a
> preparation to detach a txn from a fiber and a fiber gc storage.
The patch is OK as the first patch on the stack, I hope most of
the allocations will begin using txn region in subsequent patches.
A few minor comments:
- let's use a single linked list, unless there is a good reason to
use a double linked list
- let's preserve THRASH, or maybe there is already thrash in
region_free?
- it's good we use sizeof(txn) in region_truncate(), but let's
assert that region_alloc() does use sizeof(txn) and doesn't
align it in any way.
- I would not add txn_new/txn_free as separate methods, they are
not useful on their own
- I thought we already have ER_NO_ACTIVE_TRANSACTION error, but
found we don't. We have ER_SAVEPOINT_NO_TRANSACTION though.
Perhaps we could make it more generic? Well, your choice is good
enough, but then again, maybe make *it* generic?
E.g., could we perhaps make the message like this:
Can not %s when there is no active transaction.
We could even rename ER_SAVEPOINT_NO_TRANSACTION, change the
error message to one with a placeholder and reuse it.
What do you think?
--
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov
next prev parent reply other threads:[~2019-04-10 10:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-10 7:22 [tarantool-patches] [PATCH 0/2] Transaction refactoring Georgy Kirichenko
2019-04-10 7:22 ` [tarantool-patches] [PATCH 1/2] Introduce a txn memory region Georgy Kirichenko
2019-04-10 10:11 ` Konstantin Osipov [this message]
2019-04-10 7:22 ` [tarantool-patches] [PATCH 2/2] Get rid of aurocommit from a txn structure Georgy Kirichenko
2019-04-11 6:43 ` [tarantool-patches] " Konstantin Osipov
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=20190410101148.GL8268@chai \
--to=kostja@tarantool.org \
--cc=georgy@tarantool.org \
--cc=tarantool-patches@freelists.org \
--subject='[tarantool-patches] Re: [PATCH 1/2] Introduce a txn memory region' \
/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