[tarantool-patches] Re: [PATCH 01/10] Introduce a txn memory region

Konstantin Osipov kostja.osipov at gmail.com
Wed Apr 24 21:20:55 MSK 2019


* Georgy Kirichenko <georgy at tarantool.org> [19/04/19 19:59]:
> 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 to push.

See two minor comments below.

>  struct txn {
> +	struct stailq_entry list;
Please rename to in_txn_cache

> +	struct region region;

Please provide meaningful comments for both members: e.g. say that
we can have more than one transaction per an active fiber in case
of parallel applier for replication changes plus we want to detach
a transaction from a fiber to allow interactive transactions.

In theory this patch increases the amount of memory locked to the
runtime pool, but since this is O(1) right now I would ignore
this.

As a follow up patch please consider optimizing txn_new() for
cases when txn is taken from the cache: some of the members are
cleared by txn_commit()/txn_rollback() so do not need to be set
again. This is a very hot path!


-- 
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov




More information about the Tarantool-patches mailing list