Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
cli/sync: Rewrite Announcement in Two Phases
Archived lorenz opened 11 months ago

The code for announcing changes is rewritten. It is now separated into two phases, such that first, announcements are made to preferred seeds, and only then, to other seeds, to meet desired replication target.

The primary reason is that in order for an announcement process to be considered successful, there are two conditions, and both have to be met:

  1. All preferred seeds must be in sync.
  2. Replication target must be met.

Up to now, the two conditions were correctly recognized, but it was hard to follow for the user, since they were both tracked in a pass.

Along the way I improved the messages quite a bit. It is now possible to obtain progress information, such as how many seeds are already in sync, as the process of announcement unfolds.

I took care to use the terminology “announce”, “sync” and “seed” precisely.

This is motivated by

issue/022227e32a410d39118c35f7909d3512e980bc29

but since my understanding of the situation improved after working with the code, I deviated from my original (much too verbose), proposal.

What I originally wanted is more or less what one gets with --debug.

lorenz opened with revision 01e2e755 on base f30760d6 +372 -140 11 months ago

The code for announcing changes is rewritten. It is now separated into two phases, such that first, announcements are made to preferred seeds, and only then, to other seeds, to meet desired replication target.

The primary reason is that in order for an announcement process to be considered successful, there are two conditions, and both have to be met:

  1. All preferred seeds must be in sync.
  2. Replication target must be met.

Up to now, the two conditions were correctly recognized, but it was hard to follow for the user, since they were both tracked in a pass.

Along the way I improved the messages quite a bit. It is now possible to obtain progress information, such as how many seeds are already in sync, as the process of announcement unfolds.

I took care to use the terminology “announce”, “sync” and “seed” precisely.

This is motivated by

issue/022227e32a410d39118c35f7909d3512e980bc29

but since my understanding of the situation improved after working with the code, I deviated from my original (much too verbose), proposal.

What I originally wanted is more or less what one gets with --debug.

lorenz commented on revision 1 11 months ago

Not there yet, but one can get an idea where I am going:

https://asciinema.org/a/oBFmCD5AgVFd3LxTtTse77NTA