@@ -571,12 +571,13 @@ where C: RaftTypeConfig
571
571
/// - `Ok((read_log_id, last_applied_log_id))` on successful confirmation that the node is the
572
572
/// leader. `read_log_id` represents the log id up to which the state machine should apply to
573
573
/// ensure a linearizable read.
574
- /// - `Err(RaftError<CheckIsLeaderError>)` if it detects a higher term, or if it fails to
575
- /// communicate with a quorum of followers .
574
+ /// - `Err(RaftError<CheckIsLeaderError>)` if this node fail to ensure its leadership, for
575
+ /// example, it detects a higher term, or fails to communicate with a quorum.
576
576
///
577
- /// The caller should then wait for `last_applied_log_id` to catch up, which can be done by
578
- /// subscribing to [`Raft::metrics`] and waiting for `last_applied_log_id` to
579
- /// reach `read_log_id`.
577
+ /// Once returned, the caller should wait for the state machine to apply entries up to
578
+ /// `read_log_id`. This can be done by using the [`wait()`] as shown in the example
579
+ /// below, or by directly monitoring `last_applied` in [`Raft::metrics`] until it reaches or
580
+ /// exceeds `read_log_id`.
580
581
///
581
582
/// # Examples
582
583
/// ```ignore
@@ -589,6 +590,8 @@ where C: RaftTypeConfig
589
590
/// The comparison `read_log_id > applied_log_id` would also be valid in the above example.
590
591
///
591
592
/// See: [Read Operation](crate::docs::protocol::read)
593
+ ///
594
+ /// [`wait()`]: Raft::wait
592
595
#[ tracing:: instrument( level = "debug" , skip( self ) ) ]
593
596
pub async fn get_read_log_id (
594
597
& self ,
@@ -639,6 +642,7 @@ where C: RaftTypeConfig
639
642
/// `_ff` means fire and forget.
640
643
///
641
644
/// It is same as [`Raft::client_write`] but does not wait for the response.
645
+ #[ since( version = "0.10.0" ) ]
642
646
#[ tracing:: instrument( level = "debug" , skip( self , app_data) ) ]
643
647
pub async fn client_write_ff ( & self , app_data : C :: D ) -> Result < ResponderReceiverOf < C > , Fatal < C > > {
644
648
let ( app_data, tx, rx) = ResponderOf :: < C > :: from_app_data ( app_data) ;
0 commit comments