-
Notifications
You must be signed in to change notification settings - Fork 543
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
Breaking changes in coming v3.0 #46
Comments
they are not breaking changes, just some new features. both have been implemented & extensively tested. will make them publicly available as a feature branch later this week. Looking forward to have your feedbacks. :) |
Thank you! Been trying to figure out a way to add subscribers or notifiers and the new update signature sounds like it should work perfectly for that. Looking forward to the new release and thank you for the awesome work. |
all breaking changes mentioned above have been implemented in the beta v3.0 release, https://github.com/lni/dragonboat/tree/beta-release-3.0 please feel free to raise issues if you see anything broken or strange. thanks! |
Awesome thank you! The disk based state machine looks fantastic and fits my usecase better than pure in mem. Any reason for the fork of gorocksdb or can I just use the original? |
Hi @riaan53 The patched version of gorocksdb included in dragonboat has some extensions, e.g. the OKey() and OValue() methods of the Iterator type. Most of them were added to avoid extra allocations. I didn't try to upstream my changes as the original interface seem to be complete and it is mostly a one-to-one mapping of the RocksDB's interface, introducing such extra methods for minor performance gain might not be the general goal of the gorocksdb project. Another change I made to the included gorocksdb package in v3.0 beta is to allow users to use the original gorocksdb in their own dragonboat based applications. All exported names have been renamed from gorocksdb_* to dragonboat_*. Below is a link to the on disk state machine example, as you can see, it includes a copy of the original gorocksdb (with *_test.go removed). When you run this example, there are actually two versions of gorocksdb running in the same process. https://github.com/lni/dragonboat-example/tree/on-disk-state-machine/ondisk |
The coming new release will have the version number bumped to v3.0. It is a major release with the following breaking changes -
Your existing code is probably doing this -
Please update it to
Existing user applications can be easily updated to use the new API. For existing Update() method:
should be changed to:
you can also choose to implement the optional NALookup([]byte) ([]byte, error) method to retain the old interface and behaviour.
in v3.0, the GetHash method will be changed to return (uint64, error), it also becomes an optional method, you no longer have to implement it.
In v3.0, the SaveSnapshot no longer require the number of written bytes to be returned. This is based on observation that multiple users got confused by the existing API.
Existing user applications can be easily updated to use the new API. For existing SaveSnapshot() method:
should be changed to
Note that the v2.x release will continue to be supported for fixing critical bugs. Users are free to choose whether to the use v2.x which is more stable or v3.0 for more advanced features.
Drummer has been moved into the internal package. The MasterClient interface has been replaced by a GetNodeHostInfo() API.
The C++ binding will be removed from the dragonboat repo. It might be moved to a separate repo in the future if someone can offer to maintain it.
The text was updated successfully, but these errors were encountered: