[store] test: fix the RaftError::Shutdown issue#1546
Conversation
|
Thanks for the contribution! Please review the labels and make any necessary changes. |
3 similar comments
|
Thanks for the contribution! Please review the labels and make any necessary changes. |
|
Thanks for the contribution! Please review the labels and make any necessary changes. |
|
Thanks for the contribution! Please review the labels and make any necessary changes. |
Codecov Report
@@ Coverage Diff @@
## master #1546 +/- ##
=======================================
Coverage 73% 73%
=======================================
Files 535 535
Lines 32862 32981 +119
=======================================
+ Hits 24076 24254 +178
+ Misses 8786 8727 -59
Continue to review full report at Codecov.
|
- Every test case creates its own span as a root. This way the logging/tracing belonging to a single test is easy to grep. - Upgrade to async-raft 0.6.2-alpha.11, with enhanced tracing: a span is send along with a message through channels. Thus a complete workflow can be tracked.
When running unittest, with heavy cpu load, heartbeat message has chance to be delayed too much. When this happens, a follower tries to elect itself and revert the current leader to a follower state. This causes the leader to discard every in progress request it has received. And the client receives an **inappropriate** error `RaftError::Shuttingdown`. This is actually not a bug. In such case in practise, a client should re-fetch the latest leader and retry. For a unittest, we just extend the timeout to let tests pass happily, even on a poor CI VM.
- Improve CI: run unittest with RUST_BACKTRACE=full and RUST_LOG=debug - Upload artifect for debugging when there is a failure - Refactor: elaborate error log; Record source an backtrace when converting anyhow::Error to ErrorCode
|
CI Passed |
4 similar comments
|
CI Passed |
|
CI Passed |
|
CI Passed |
|
CI Passed |
|
CI Passed |
2 similar comments
|
CI Passed |
|
CI Passed |
I hereby agree to the terms of the CLA available at: https://datafuse.rs/policies/cla/
Summary
[store] fix: snapshot replication timeout will not cause a RaftError
[test]: refactor: CI will save logs at debug level.
Improve CI: run unittest with RUST_BACKTRACE=full and RUST_LOG=debug
Upload artifect for debugging when there is a failure
Refactor: elaborate error log;
Record source an backtrace when converting anyhow::Error to ErrorCode
[query] fix dep revision
[store] test: fix the RaftError::Shutdown issue
When running unittest, with heavy cpu load, heartbeat message has chance
to be delayed too much.
When this happens, a follower tries to elect itself and revert the
current leader to a follower state.
This causes the leader to discard every in progress request it has
received. And the client receives an inappropriate error
RaftError::Shuttingdown.This is actually not a bug.
In such case in practise, a client should re-fetch the latest leader
and retry.
For a unittest, we just extend the timeout to let tests pass happily,
even on a poor CI VM.
[store] refactor: refine tracing
Every test case creates its own span as a root.
This way the logging/tracing belonging to a single test is easy to
grep.
Upgrade to async-raft 0.6.2-alpha.11, with enhanced tracing:
a span is send along with a message through channels.
Thus a complete workflow can be tracked.
[store] fix: fix flaky test: generic-kv: get-unexpired
Changelog
Related Issues