Comments (1)
AFAIK, send()
is synchronized between threads. E.g. a Receiver::borrow()
that is called after send()
should always see the updated value:
https://docs.rs/tokio/1.8.0/src/tokio/sync/watch.rs.html#360
https://docs.rs/tokio/1.8.0/src/tokio/sync/watch.rs.html#231
But you are still not guaranteed to see the correct leader
because the leader may have changed again.
What's your root need for this? Why do you need the leader-id when applying a log entry?
Since there is no guarantee that every follower sees the same leader-id when applying a certain log entry.
from openraft.
Related Issues (20)
- storage apply entry is single thread ? why this need send && sync trait HOT 2
- Cancel Snapshot Jobs HOT 11
- Leader does not step down? HOT 1
- Update API trait with GAT HOT 5
- Refactor snapshot API HOT 22
- Raft Leader doesn't come back up after application restart HOT 9
- Learners do not appear in Membership.all_nodes HOT 6
- Avoid double-wal HOT 4
- flush after write in rocksdb example HOT 2
- Question: There is no need to rebuild the state machine when a node restarts. HOT 2
- Remove error NodeNotFound HOT 1
- Error handling at user space HOT 2
- Doc: Explain how to monitor a raft cluster and do maintenance HOT 1
- Build deterministic tests based on turmoil HOT 2
- Move replication algorithm to Engine HOT 1
- Redundant information in `LeaderId::node_id` HOT 7
- introduce a feature to disable/enable to contain a node-id in LogId HOT 1
- What's blocking openraft from using stable rust? HOT 3
- examples/raft-kv-rocksdb timeout sending append-entries RPC HOT 4
- Use ClientWriteResponse to replace AddLearnerResponse HOT 1
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.