Skip to content

Don't schedule replication jobs in SetAuthoritativeStorage

Sami Hiltunen requested to merge smh-dont-replicate-accept-dataloss into master

SetAuthoritative storage sets a replica's generation to be the latest one as a way to accept dataloss when all copies of the repository on the latest generation are lost. To replicate the promoted replica to the other storages, the method also schedules replication jobs to other storages. Since the introduction of the automatic reconciler, this is not really necessary as the reconciler would handle the job scheduling. The method also doesn't take into account whether the other storages are assigned hosts of the repository, and instead replicates the repository everywhere. The method should also be expanded to handle repository ID propagation via the replication jobs. To solve both problems at once, this MR removes the explicit job scheduling from SetAuthoritativeStorage and let's it rely on the reconciler to schedule the jobs correctly.

Edited by Sami Hiltunen

Merge request reports

Loading