Ok, as far as wal_begin_checkpoint does pretty much the same thing as
wal_sync and allows us to obtain vclock in a more direct way, i see why
we should prefer it. Although it brings slight overhead comparing to
wal_sync, it doesn't really seem to be significant. Sent v2 of the patch.
Понедельник, 28 октября 2019, 9:43 +03:00 от Konstantin Osipov <kostja.osipov@gmail.com>:
* Ilya Kosarev <i.kosarev@tarantool.org> [19/10/28 09:41]:
> The idea of the patch "relay: join new replicas off read view"
> (6332aca655ae7f95d391bdc0109e79915f6e6ad0), which brought us to the
> currently discussed patch, was to get rid of checkpoint as a prerequisite
> of replica joining. Therefore, why would we need to perform checkpointing
> here and how is it better than proposed approach, which seems to be more
> lightweight?
wel_begin_checkpoint() doesn't perform a checkpoint. It ensures
the current state of the database is flushed to the write ahead log.
I don't suggest a full blown checkpoint is initiated.
--
Konstantin Osipov, Moscow, Russia