[Tarantool-patches] [RFC v5 3/5] limbo: gather promote tracking into a separate structure

Cyrill Gorcunov gorcunov at gmail.com
Thu Jul 15 14:46:06 MSK 2021


On Thu, Jul 15, 2021 at 02:28:46PM +0300, Serge Petrenko wrote:
> > +static void
> > +txn_limbo_promote_create(struct txn_limbo_promote *pmt)
> > +{
> > +	vclock_create(&pmt->terms_map);
> > +	pmt->terms_max = 0;
> > +}
> > +
> 
> I don't like the name (limbo->promote, struct txn_limbo_promote),
> but can't come up with a better one.
> 
> The structure doesn't hold a specific promote. It's more like "promote
> history", or "terms seen".
> 
> Maybe something like "term history" ? "term tracker" ?
> "remote term set", "term set" ?
> 
> Just a suggestion, my names are not too good.

Sure! How about

struct txn_terms {
	latch		lock;
	vclock_t	map;
	uint64_t	map_max;
};

struct txn_limbo {
	...
	struct txn_terms terms;
	...
};

I don't mind for any name (except "set" because
set can't contain duplicated elements and our
vclock can have same term installed for different
replicas)

	Cyrill


More information about the Tarantool-patches mailing list