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

Serge Petrenko sergepetrenko at tarantool.org
Thu Jul 15 15:00:11 MSK 2021



15.07.2021 14:46, Cyrill Gorcunov пишет:
> 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;
> };

Maybe txn_limbo_terms then?
txn_terms sounds like something related to transactions,
but transactions know nothing of terms.

> 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

-- 
Serge Petrenko



More information about the Tarantool-patches mailing list