You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These public methods are not async, but they have to call some async RPCs. I try to solve this with futures::executor::block_on, now the methods will block until success even if the servers are down.
2. What did you expect to see?
Pass all the tests in kvraft.
3. What did you see instead?
In test_one_partition_3a:
cfg.net.spawn(future::lazy(move |_| {
ckp2a.put("1".to_owned(),"15".to_owned());// snip}));// snip
cfg.net.spawn(future::lazy(move |_| {// different clerk in p2
ckp2b.get("1".to_owned());// snip}));
Run executor::block_on (LocalPool) from within cfg.net.spawn (ThreadPool) will panic with EnterError. Maybe we can solve this with something else, but the limitation is too inconvenient.
In generic_test_linearizability:
let operations = Arc::new(Mutex::new(vec![]));// Clone the `operations`, move to `async` block, and call the methods.// Shut down the servers and tell the clients to quit.if !check_operations_timeout(KvModel{},Arc::try_unwrap(operations).unwrap().into_inner().unwrap(),LINEARIZABILITY_CHECK_TIMEOUT,){panic!("history is not linearizable");}
Since the methods must succeed, they have to retry calling RPCs. So we cannot tell the clients to quit via shutting down the servers, and the Arc::try_unwrap may return Err and lead to panic.
The text was updated successfully, but these errors were encountered:
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. What did you do?
In
client.rs
, we will seeThese public methods are not
async
, but they have to call someasync
RPCs. I try to solve this withfutures::executor::block_on
, now the methods will block until success even if the servers are down.2. What did you expect to see?
Pass all the tests in kvraft.
3. What did you see instead?
In
test_one_partition_3a
:Run
executor::block_on
(LocalPool
) from withincfg.net.spawn
(ThreadPool
) will panic withEnterError
. Maybe we can solve this with something else, but the limitation is too inconvenient.In
generic_test_linearizability
:Since the methods must succeed, they have to retry calling RPCs. So we cannot tell the clients to quit via shutting down the servers, and the
Arc::try_unwrap
may returnErr
and lead to panic.The text was updated successfully, but these errors were encountered: