-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Allow newly added fields to sync via p2p #1226
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1226 +/- ##
===========================================
- Coverage 70.74% 70.60% -0.15%
===========================================
Files 182 182
Lines 17133 17138 +5
===========================================
- Hits 12121 12100 -21
- Misses 4091 4109 +18
- Partials 921 929 +8
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for fixing this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
4497e3a
to
17ae8c6
Compare
c0ab822
to
66bd567
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ezpz
Oddly, everywhere in our codebase apart from a single line in the P2P code hardcodes field CRDT Type to LWW_Register, even if FieldDescription.Typ is readily available.
66bd567
to
687b0e8
Compare
* Document FieldDescription.Typ * Default Field CRDT Type to LWW_Register Oddly, everywhere in our codebase apart from a single line in the P2P code hardcodes field CRDT Type to LWW_Register, even if FieldDescription.Typ is readily available.
* Document FieldDescription.Typ * Default Field CRDT Type to LWW_Register Oddly, everywhere in our codebase apart from a single line in the P2P code hardcodes field CRDT Type to LWW_Register, even if FieldDescription.Typ is readily available.
Relevant issue(s)
Resolves #1185
Description
Allows newly added fields to sync via P2P. Was a much much easier fix than I expected - problem was that field CRDT Type was not set, and no where in our codebase besides a single line in the P2P system actually cared or used it - the rest are just hardcoded to LWW_Register (#1225).
I dont want users to have to explicitly specify this, so it defaults to LWW_Register if not set.
This is not a breaking change in that the cids have only changed for new fields being added. It does mean that any databases who have added new fields in the few weeks since adding that feature have a broken database, but I dont think we need to worry about that (given current Defra usage).