-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Switch to cilium/statedb #32125
Switch to cilium/statedb #32125
Conversation
ac4c439
to
85257f3
Compare
This comment was marked as outdated.
This comment was marked as outdated.
85257f3
to
5b595a6
Compare
This comment was marked as outdated.
This comment was marked as outdated.
5b595a6
to
2cf631b
Compare
This comment was marked as outdated.
This comment was marked as outdated.
2cf631b
to
bae5261
Compare
bae5261
to
3c2bed3
Compare
cf4f30c
to
96c858f
Compare
1477f04
to
2033049
Compare
/test |
a6c45f9
to
6dc538c
Compare
- Remove pkg/statedb and vendor cilium/statedb - Rename imports of pkg/statedb to cilium/statedb - Replace the StateDB Swagger API endpoints with the HTTP handler implemented in StateDB. - Fix up the change from DeleteTracker() to Changes() in StateDB API. - Add metrics adapters for statedb and reconciler Signed-off-by: Jussi Maki <jussi@isovalent.com>
Use the statedb.Handle instead of statedb.DB in devices controller so that the DB related metrics are correctly accounted for in the devices controller. This serves as an initial example for how to use the named handles. Signed-off-by: Jussi Maki <jussi@isovalent.com>
6dc538c
to
759f76b
Compare
/test |
StateDB has switched from gob encoding to JSON encoding in order to support wider range of different types. This allows writing custom marshalling to for example transfer private fields etc. The "error" type is not JSON marshable (it's an interface type), so switch to string instead. Signed-off-by: Jussi Maki <jussi@isovalent.com>
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.
approving vendor changes.
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.
Thanks!
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! 🚀
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 for ci-structure
This PR removes pkg/statedb, pulls in cilium/statedb and fixes up StateDB usage in few places as cilium/statedb had evolved a bit.
Here's a summary of changes:
/statedb/
in the UNIX socket HTTP APIstatedb.Handle
. Usingstatedb.Handle
instead of*statedb.DB
will account metrics to the module id instead of the generic "DB" handle.Additionally small boy scout cleanups that I encounted when testing:
The major functional change in
cilium/statedb
is the switch to our own adaptive radix tree implementation from go-immutable-radix which doubles the insert throughput of StateDB and almost halves memory usage as the tree nodes are now more compact.Benchmarks (insert of 1000 objects in various txn sizes):
Thank you for reviewing 🥰 . It's a lot!