Page MenuHomePhabricator

sidedata-exchange: rewrite sidedata on-the-fly whenever possible

Authored by Alphare on Feb 19 2021, 6:16 AM.



When a A exchanges with B, the difference of their supported sidedata categories
is made, and the responsibility is always with the client to generated it:

  • If A pushes to B and B requires category foo that A does not have, A will need to generate it when sending it to B.
  • If A pulls from B and A needs category foo, it will generate foo before the end of the transaction.
  • Any category that is not required is removed. If peers are not compatible, abort.

It is forbidden to rewrite sidedata for a rev that already has sidedata, since
that would introduce unreachable (garbage) data in the data file, something
we're not prepared for yet.

Diff Detail

rHG Mercurial
No Linters Available
No Unit Test Coverage

Event Timeline

Alphare created this revision.Feb 19 2021, 6:16 AM
baymax updated this revision to Diff 25999.Mar 1 2021, 11:52 AM

✅ refresh by Heptapod after a successful CI run (🐙 💚)

Alphare updated this revision to Diff 26095.Mar 4 2021, 10:18 AM

Looks okay.


small nit: use an intermediate variable to avoid the spread on 5 lines.


The TODO comment should be duplicated near the declaration of the experimental config since we need this fixed before getting it out of experimental.

Alphare updated this revision to Diff 26226.Mar 10 2021, 2:12 PM
marmoute requested changes to this revision.Mar 11 2021, 1:21 PM
This revision now requires changes to proceed.Mar 11 2021, 1:21 PM
Alphare updated this revision to Diff 26259.Mar 12 2021, 6:34 AM
marmoute requested changes to this revision.Fri, Mar 12, 1:11 PM
This revision now requires changes to proceed.Fri, Mar 12, 1:11 PM
marmoute accepted this revision.Mon, Mar 15, 7:01 AM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.