[Tarantool-patches] [PATCH v3 2/4] gc: rely on minimal vclock components instead of signatures

Serge Petrenko sergepetrenko at tarantool.org
Fri Mar 27 13:24:11 MSK 2020


> 23 марта 2020 г., в 19:40, Konstantin Osipov <kostja.osipov at gmail.com> написал(а):
> 
> * Serge Petrenko <sergepetrenko at tarantool.org> [20/03/23 19:23]:
>> +	struct vclock min_vclock;
>> +	struct vclock *vclock;
>> +	struct gc_consumer *consumer = gc_tree_first(&gc.consumers);
>> +	if (consumer != NULL) {
>> +		vclock_copy(&min_vclock, &consumer->vclock);
>> +		while ((consumer = gc_tree_next(&gc.consumers, consumer)) != NULL) {
>> +			vclock_min(&min_vclock, &consumer->vclock);
>> +		}
>> +		vclock_min(&min_vclock, &checkpoint->vclock);
>> +		vclock = &min_vclock;
>> +	} else {
>> +		vclock =  &checkpoint->vclock;
>> +	}
> 
> This loop is a total magic to anyone not present at our zoom
> conversation. Please explain what's going on here in a comment.

Added a comment.

> 
> 
> 
> -- 
> Konstantin Osipov, Moscow, Russia
> https://scylladb.com


--
Serge Petrenko
sergepetrenko at tarantool.org


More information about the Tarantool-patches mailing list