v0.9.5 #1098
drmingdrmer
announced in
Announcements
v0.9.5
#1098
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary:
Raft::is_initialized()
.RaftTypeConfig::Responder
to customize returning client write response.Raft::client_write_ff()
ff for fire-and-forget.Detail:
Added:
Added: e4fed706 Add
Raft::is_initialized()
; by 张炎泼; 2024-04-08Raft::is_initialized()
returnstrue
if this raft node is alreadyinitialized with
Raft::initialize()
, by checking if log is empty andvote
is not written.Added: 3b18517a Add
RaftTypeConfig::Responder
to customize returning client write response; by 张炎泼; 2024-04-03This commit introduces the
Responder
trait that defines the mechanismby which
RaftCore
sends responses back to the client after processingwrite requests. Applications can now customize response handling by
implementing their own version of the
RaftTypeConfig::Responder
trait.The
Responder::from_app_data(RaftTypeConfig::D)
method is invoked tocreate a new
Responder
instance when a client write request isreceived.
Once the write operation is completed within
RaftCore
,Responder::send(WriteResult)
is called to dispatch the resultback to the client.
By default,
RaftTypeConfig::Responder
retains the existingfunctionality using a oneshot channel, ensuring backward compatibility.
This change is non-breaking, requiring no modifications to existing
applications.
Added: c508a354
Raft::client_write_ff()
ff for fire-and-forget; by 张炎泼; 2024-04-08Raft<C>::client_write_ff() -> C::Responder::Receiver
submit a clientrequest to Raft to update the state machine, returns an application
defined response receiver
Responder::Receiver
to receive the response._ff
means fire and forget.It is same as [
Raft::client_write
] but does not wait for the response.When using this method, it is the application's responsibility for
defining mechanism building and consuming the
Responder::Receiver
.Full Changelog: v0.9.4...v0.9.5
This discussion was created from the release v0.9.5.
Beta Was this translation helpful? Give feedback.
All reactions