You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In openraft adds a learner is done by committing a membership config log, which is almost the same as committing any log.
AddLearnerResponse contains a field matched to indicate the replication state to the learner, which is not included in ClientWriteResponse. This information can be retrieved via Raft::metrics().
Therefore to keep the API simple, replace AddLearnerResponse with ClientWriteResponse.
In openraft adds a learner is done by committing a membership config
log, which is almost the same as committing any log.
`AddLearnerResponse` contains a field `matched` to indicate the
replication state to the learner, which is not included in
`ClientWriteResponse`. This information can be retrieved via
`Raft::metrics()`.
Therefore to keep the API simple, replace `AddLearnerResponse` with
`ClientWriteResponse`.
Behavior change: adding a learner always commit a new membership config
log, no matter if it already exists in membership.
To avoid duplicated add, an application should check existence first by
examining `Raft::metrics()`
- Fix: datafuselabs#679
Upgrade tips:
- Replace AddLearnerResponse with ClientWriteResponse
- Replace AddLearnerError with ClientWriteError
Passes the application compilation.
See the changes in examples/.
In openraft adds a learner is done by committing a membership config log, which is almost the same as committing any log.
AddLearnerResponse
contains a fieldmatched
to indicate the replication state to the learner, which is not included inClientWriteResponse
. This information can be retrieved viaRaft::metrics()
.Therefore to keep the API simple, replace
AddLearnerResponse
withClientWriteResponse
.AddLearnerResponse
:openraft/openraft/src/raft.rs
Lines 855 to 861 in 4a85ee9
ClientWriteResponse
:openraft/openraft/src/raft.rs
Lines 1266 to 1275 in 4a85ee9
The text was updated successfully, but these errors were encountered: