-
Notifications
You must be signed in to change notification settings - Fork 51
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
feat: Add PN Counter CRDT type #2119
feat: Add PN Counter CRDT type #2119
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #2119 +/- ##
===========================================
- Coverage 74.29% 74.23% -0.06%
===========================================
Files 252 256 +4
Lines 25242 25366 +124
===========================================
+ Hits 18752 18829 +77
- Misses 5217 5261 +44
- Partials 1273 1276 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 7 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
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.
Looks good - thanks Fred. I'm approving now with a handful of small comments open, assuming that they will all be resolved sensibly.
I might have more comments/questions depending on the documentation added in db/collection.go RE todo: Please document why LLWRs should not do this
, but as it is a very local issue and I'm going away please don't block the merging of this PR until I'm back if I don't get back to you in the meantime.
tests/integration/net/state/simple/peer_replicator/crdt/pncounter_test.go
Show resolved
Hide resolved
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.
Only part way through, but wanted to submit this now.
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.
Looks great so far. I just have few questions and minor requests.
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!
01d9b7a
to
f62b2b9
Compare
4f4ff6f
to
63e011a
Compare
`cfg.LoadRootDirFromFlagOrDefault` is already called by `cfg.LoadWithRootdir`.
added a `WithCustomValues` method on `Config` to persis changes on the viper config. This will ensure that when the cli is executed, it uses the manually assigned values and not just the default.
This commit applies all the received feedback plus adds support for Float kind in for the PN Counter.
8d3bd46
to
f78e33b
Compare
Discussed in standup that we will revisit if concerns are validated in the future
## Relevant issue(s) Resolves sourcenetwork#2115 ## Description This PR adds the PN Counter CRDT type. This type enforces changes that are incrementing or decrementing the value. A value cannot be set directly. The PR also simplifies the CRDT flow a bit further. For example, the `Data` field on the composite CRDT has been removed since the type links to the changed fields. This change will removes the data leak that would be present once we implement field level access control.
## Relevant issue(s) Resolves sourcenetwork#2115 ## Description This PR adds the PN Counter CRDT type. This type enforces changes that are incrementing or decrementing the value. A value cannot be set directly. The PR also simplifies the CRDT flow a bit further. For example, the `Data` field on the composite CRDT has been removed since the type links to the changed fields. This change will removes the data leak that would be present once we implement field level access control.
Relevant issue(s)
Resolves #2115
Description
This PR adds the PN Counter CRDT type. This type enforces changes that are incrementing or decrementing the value. A value cannot be set directly.
The PR also simplifies the CRDT flow a bit further. For example, the
Data
field on the composite CRDT has been removed since the type links to the changed fields. This change will removes the data leak that would be present once we implement field level access control.Tasks
How has this been tested?
make test with added integrations tests
Specify the platform(s) on which this was tested: