Comments (4)
It's worth considering the alternative where snapshot chunks are sent, processed, and responded inside the library. That gives Raft term checking, matchIndex/nextIndex updating, election timer updating, etc. (E.g., daos-stack@67db859#diff-857b5d8f957ff267859c82da4461e650R781)
from raft.
@liw It's not always the case where it's possible or correct to serialize the FSM state and delivery it as chunks through the library, so I don't think this should completely replace the current load snapshot mechanism.
from raft.
Originally I had the library manage the sending of the snapshot. I felt the library ended up prescribing the snapshot's transport mechanism too much, which is a no no for this project.
This situation is probably when it makes more sense for the library to be responsible for sending snapshots.
However, I think we just need to add a new function for the user to call once the snapshot has been delivered, something like:
int raft_confirm_delivered_snapshot(raft_t*, raft_node_t*);
This function might be useful for blocking raft_begin_snapshot
while there's a snapshot being sent.
from raft.
The installsnapshot messages don't prescribe if or how a snapshot is chunked, or how it is transferred. E.g., a caller may choose to transfer a snapshot into a file on a follower and send an installsnapshot message plus the path to the file. Another caller may want to send a snapshot in chunks but transfer only an RDMA descriptor with the installsnapshot message to a follower. If a caller would like to have multiple chunks in flight, he may want to transfer sequence and other info with each installsnapshot message.
from raft.
Related Issues (20)
- Possible issues HOT 1
- How to add SOVERSION to libraft.so?
- Not implemented log_clear callback leads to not synchronized logs
- reserved identifier violation
- Unused raft_term_t term in log_load_from_snapshot
- potential race condition in removing/adding same node?
- Should we submit empty log after a new leader elected?
- Allow easy build without coverage symbols and AddressSanitizer
- Errors `undefined reference to raft_new()` and `undefined reference to raft_add_node(void**, void*, int, int)` HOT 1
- leader election without log involved? HOT 8
- disk write and leader timeout HOT 4
- Documents are old HOT 5
- Add PreVote support
- raft_send_appendentries_all logic HOT 1
- Log interface decoupling HOT 5
- Empty AppendEntries requests are sent during non-idle periods
- FSM log entries are applied lazily HOT 1
- Meaning of entry_idx in log_offer
- log_get_from_idx not including entries that have wrapped around? HOT 2
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 raft.