PsiACE / riteraft

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

[Solved] Need to upgrade to tokio-1, the example does not work. #1

Closed PsiACE closed 3 years ago

PsiACE commented 3 years ago

I am trying to upgrade it to tokio 1. The current work is https://github.com/ritedb/riteraft/tree/tokio-1 .

It seems that it has passed the compilation, but it cannot work with actix-web for the time being. Even if use actix-web 4 that has not been officially released.

PsiACE commented 3 years ago

See https://github.com/ritedb/riteraft/commit/c7bf4c90c7753817032fc6261ea109818a822d4a

Reproduce

  1. cargo build --release
  2. RUST_BACKTRACE=1 ./target/release/riteraft-memstore --raft-addr 0.0.0.0:3000 --web-server 0.0.0.0:5000
  3. curl "0.0.0.0:5000/put/1/1"
PsiACE commented 3 years ago

At present, another example for warp has been implemented. The problem still lies in tokio-1.

PsiACE commented 3 years ago

Fix by #5