PsiACE / riteraft

RiteRaft - A raft framework, for regular people
Apache License 2.0
320 stars 22 forks source link

Crashed after 255 commit #16

Closed Darm0n closed 1 year ago

Darm0n commented 2 years ago

Hi all, I use this library in my project, and find it will crash after 255th commit. I also test the example code, it also crashes after subunit around 255 puts. Here is one log from my project, the crash occurs when the mailbox sends a message and receives an error result.

log
node2_1  | Jul 07 15:16:44.508 INFO [commit: 255] ignored snapshot [index: 245, term: 2], snapshot_term: 2, snapshot_index: 245, commit: 255, raft_id: 3, version: 1.0.0
node3_1  | Jul 07 15:16:44.508 INFO [commit: 255] ignored snapshot [index: 245, term: 2], snapshot_term: 2, snapshot_index: 245, commit: 255, raft_id: 2, version: 1.0.0

node1_1  | thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: Unknown', src/main.rs:217:55

Crash code line82 on example let result = data.0.send(message).await.unwrap();

PsiACE commented 2 years ago

Unfortunately, as this crate has not been rigorously tested and produced, perhaps it is marked as being in a prototype stage.

If you are interested, you can commit a patch to fix this issue.

I think I will eventually return to this project, but I can't make any guarantees.

PsiACE commented 2 years ago
thread 'tokio-runtime-worker' panicked at 'unexpected error getting unapplied entries [256, 256): Store(Compacted), raft_id: 2, version: 0.1.0', .cargo/git/checkouts/raft-rs-42b8049ef2e3af07/eec5ead/src/raft.rs:1338:17
jopemachine commented 1 year ago

This issue could be resolved as the same way with https://github.com/lablup/riteraft-py/issues/8