/// write new record and notify the leader replica controller
/// TODO: may replica should be moved it's own map
write new record and notify the leader replica controller
TODO: may replica should be moved it's own map
write new record and notify the leader replica controller TODO : may replica should be moved it ' s own map
pub async fn send_records(
        &self,
        rep_id: &ReplicaKey,
        records: DefaultRecords,
        update_hw: bool,
    ) -> Result<bool, InternalServerError> {
        if let Some(mut leader_replica) = self.get_mut_replica(rep_id) {
            leader_replica
                .send_records(records, update_hw)
                .await?;
            self.send_message(rep_id, LeaderReplicaControllerCommand::EndOffsetUpdated)
                .await
                .map_err(|err| err.into())
        } else {
            warn!("no replica is found: {}", rep_id);
            Ok(false)
        }
    }
pub async fn send_records ( & self , rep_id : & ReplicaKey , records : DefaultRecords , update_hw : bool , ) -> Result < bool , InternalServerError > { if let Some ( mut leader_replica ) = self . get_mut_replica ( rep_id ) { leader_replica . send_records ( records , update_hw ) . await ? ; self . send_message ( rep_id , LeaderReplicaControllerCommand :: EndOffsetUpdated ) . await . map_err ( | err | err . into ( ) ) } else { warn ! ( " " rep_id ) ; Ok ( false ) } }
write new record and notify the leader replica controller
TODO: may replica should be moved it's own map
write new record and notify the leader replica controller TODO : may replica should be moved it ' s own map
&self
rep_id
&ReplicaKey
records
DefaultRecords
update_hw
bool