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

Konstantin Osipov kostja.osipov at gmail.com
Mon Mar 30 15:54:47 MSK 2020


* Serge Petrenko <sergepetrenko at tarantool.org> [20/03/30 14:03]:
> >> +	while (consumer != NULL) {
> >> +		/*
> >> +		 * Consumers will never need rows signed
> >> +		 * with a zero instance id (local rows).
> >> +		 */
> >> +		vclock_min_ignore0(&min_vclock, &consumer->vclock);
> >> +		consumer = gc_tree_next(&gc.consumers, consumer);
> >> +	}
> >> +
> >> +	if (vclock_sum(&min_vclock) > vclock_sum(&gc.vclock)) {
> > 
> > Please use vclock_sum_ignore0
> >> +		vclock_copy(&gc.vclock, &min_vclock);
> > 
> > Please use vclock_copy_ignore0
> 
> I can’t. wal_collect_garbage() searches for the wal file with vclock
> strictly less than or equal to the one provided, so 0-th clock
> component cannot be zeroed out, otherwise no logs will ever be deleted.
> While all the other components are taken as a minimum between all
> consumers and the oldest snapshot, the 0-th component is copied directly
> from the oldest snapshot, since we have to keep all WALs starting from the
> oldest snapshot. It is stated in the comment a few lines above. Now i moved
> it to a more relevant place.

Wow. Please add a comment and resend an updated patch so that I
can check/lgtm it.

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


More information about the Tarantool-patches mailing list