Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
radicle: improve sync fetching
Merged fintohaps opened 11 months ago

This patch changes separates the business logic of fetching from the process of fetching itself. It does this through a sans-IO approach, where a Fetcher provides the necessary state to help drive a fetch forward, without performing any of the IO itself.

What the Fetcher cares about is:

  • What nodes are going to be attempted to be fetched from
  • In what order should they be attempted
  • When should the fetching process be considered finished

The Fetcher is then used in radicle-cli to drive forward the sync::fetch function, allowing it to only care about the IO.

fintohaps opened with revision b43fc351 on base 5a0a334d +669 -157 11 months ago

This patch changes separates the business logic of fetching from the process of fetching itself. It does this through a sans-IO approach, where a Fetcher provides the necessary state to help drive a fetch forward, without performing any of the IO itself.

What the Fetcher cares about is:

  • What nodes are going to be attempted to be fetched from
  • In what order should they be attempted
  • When should the fetching process be considered finished

The Fetcher is then used in radicle-cli to drive forward the sync::fetch function, allowing it to only care about the IO.

fintohaps pushed revision 2 a6f4be72 on base 5a0a334d +737 -158 11 months ago

Changes:

  • Fix to initialising private network for fetcher – I’m wondering if this might be a different fetcher that you don’t add other nodes to
  • Change the output to be more explicit of what the targets are – there’s a weird bug in the spinner logic, I think if the output is not uniform then it does not clear correctly.
  • Extract the logic of the spinner into a FetcherSpinner to clean up the fetch function more
lorenz pushed revision 3 a2fc3407 on base 5a0a334d +760 -170 11 months ago
  • Some reviewing and small changes.
  • Use derived implementation of Ord, which is equivalent to the one explicitly implemented before.
  • Pipe through the spinner to connect.
  • Print status dial/fetch after the overall progress to prevent flashing.
  • Explicate which target was met.
fintohaps pushed revision 4 d2ff4a39 on base 5a0a334d +799 -171 11 months ago

Changes:

  • Incorporate feedback
  • Rework output of the spinner
  • Move information of the number of candidates to the info message before spinner
  • Yellow colouring for warnings
  • Ordering of candidate nodes is purely chosen by the caller
  • Ensure that local node is never chosen
  • Ensure that nodes are unique by checking fetch results
  • Ensure that replicas can never be larger than number of candidates
fintohaps pushed revision 5 1e2d9e14 on base 5a0a334d +1011 -188 11 months ago

Changes:

  • Introduce min/max bounds for replication factor – required refactoring SyncSettings
  • Fix up documentation
  • TargetMissed split into a warning and error variant, depending on replication factor bounds
fintohaps pushed revision 6 684b8f47 on base 5a0a334d +1015 -188 11 months ago

WIP: incorporate lorenz feedback

  • Change copy
  • Move module doc string into fetch module
lorenz pushed revision 7 ad3746fc on base 5a0a334d +1027 -209 11 months ago

Review, reword help, change semantics of min/max as discussed. Stuck right in the middle.

fintohaps pushed revision 8 808cf1c6 on base 5a0a334d +1199 -188 11 months ago

WIP: fix next_node to exhaust candidates

fintohaps pushed revision 9 0504fd0b on base 5a0a334d +1290 -188 11 months ago

WIP: rework Replicas

Replicas aims for a min and tries for a max, if configured to do so

Also adding testing to the Fetcher

fintohaps pushed revision 10 97a886ec on base 5a0a334d +1301 -190 11 months ago

Using Lorenz’s help change to improve the rad sync help doc

fintohaps pushed revision 11 cbd14f21 on base 5a0a334d +1460 -266 11 months ago

Last few edits and fixing the CLI tests

TODO: clean up the change list

fintohaps pushed revision 12 9ecc8722 on base 5a0a334d +1460 -266 11 months ago

Changes:

  • Changes are cleaned up and consolidated
  • Copy of CLI output should be near, if not already, in its final form
  • CLI tests are all passing – note that one is skipped to be resolved in the next patch, regarding rad clone
fintohaps pushed revision 13 8cf7c0c5 on base 5a0a334d +1459 -265 11 months ago

Changes:

  • Fixed typo in rad-clone.md
fintohaps pushed revision 14 3cc9aba9 on base 5a0a334d +1492 -264 11 months ago

See fixup commits for changes

fintohaps pushed revision 15 ad5a1bcb on base 5a0a334d +1492 -264 11 months ago

Changes:

  • Consolidating fixup commits
did:key:z6MkgFq6...nBGz accepted · 3 comments 11 months ago
fintohaps pushed revision 16 9436bda3 on base c205322c +1489 -264 11 months ago

Rebased

fintohaps merged revision 9436bda3 at 1a67ac18 11 months ago