Comments (4)
👋 Thanks for opening this issue!
Get help or engage by:
/help
: to print help messages./assignme
: to assign this issue to you.
from openraft.
Is there a test to reproduce this issue?
I noticed it too days before and haven't yet got time to fully dig into it...
- first found in datafuselabs/databend#3474
from openraft.
the pr has been merged into openraft,but seens that has_more_log
and tokio::select
has the same effect.
from openraft.
the pr has been merged into openraft,but seens that
has_more_log
andtokio::select
has the same effect.
Hmm... not exactly. I was wrong about it last time we discuss it:
- line-14 is required to forward every log even when there is no incoming event about new logs.
- line-13 is required to shut the replication down at once even when there are still a lot of logs that need to be sent.
1 pub async fn line_rate_loop(&mut self) -> Result<(), ReplicationError> {
2 loop {
3 loop {
4 let res = self.send_append_entries().await;
5
6 if let Err(err) = res {...}
7
8 if self.matched.index == self.max_possible_matched_index {
9 break;
10 }
11 }
12
13 self.try_drain_raft_rx().await?;
14 if self.has_more_log() {
15 continue;
16 }
17
18 tokio::select! {
19 _ = self.heartbeat.tick() => { continue }
20
21 event_span = self.repl_rx.recv() => {
22 match event_span {
23 Some((event, _span)) => {
24 self.process_raft_event(event)?;
25 self.try_drain_raft_rx().await?;
26 },
27 None => {
28 return Err(ReplicationError::Closed);
29 },
30 }
31 }
32 }
33 }
34 }
from openraft.
Related Issues (20)
- Consider relaxing NodeId: Default bound HOT 4
- debug_assert causes leader to panic HOT 7
- Update examples to reflect the latest openraft API HOT 1
- an issue from async-raft HOT 4
- Do not report snapshot.last_log_id to metrics until snapshot is finished building/installing HOT 1
- Web APIs in example should follow RESTful style HOT 3
- election won't work if wrong NodeId is passed when adding node to cluster HOT 4
- error : it has to be a leader!!! HOT 5
- Feature: add `Node` information into `AppendEntriesRequest` request HOT 2
- Tracking issue for non-member Leader HOT 1
- Re call add_learner for a restarted node don't sync the state (snapshot). HOT 7
- add peek support HOT 1
- Hide `RaftStorage` and similar types from generic arguments to `Raft`/`RaftInner` HOT 7
- RaftMsg::ExternalRequest: should not rely on RaftLogStorage and RaftNetworkFactory HOT 3
- Add random number generation to `Runtime` HOT 5
- Ditch `async_trait` in favor of the official `async_fn_in_trait` feature HOT 6
- Refactor: Move `client_resp_channels` from `LeaderData` to new `tx_...`-field in `RaftCore` HOT 2
- Linearizable read with `ReadIndex` HOT 1
- about single node HOT 6
- Cluster Bootstrap and Node Initialization Sequence HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openraft.