-
Notifications
You must be signed in to change notification settings - Fork 8.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
found and fixed a bug in raft integration tests #4596
Conversation
e18f9b6
to
c9b660d
Compare
dc4ebca
to
e90788b
Compare
can you perhaps write a test that reproduces this problem? |
@tock-ibm do you want to take a look at this? |
I was wondering how to do it in a manageable way. I couldn't do it with integration tests. It's a complete asynchronous interaction. Here is a test test often crashes. For the last 2-3 months all errors in raft integration tests are the same error. For example: https://github.com/hyperledger/fabric/actions/runs/7493668256/job/20399967195 |
My solution works, but it's not pretty, I don't like it. But it fixes the error. |
Here is an example of logs with normal operation
Here are the logs at the time of the error. After that orderer1 does nothing else. Channel removal is in progress (
|
24ddb80
to
88e1110
Compare
e3e60a5
to
4062018
Compare
Signed-off-by: Fedor Partanskiy <pfi79@mail.ru>
Often fails this test
Failure occurs when waiting for the orderer to delete a channel
Here is an explanation: why they added the removal of the channel with orderer
I'll describe what's going on:
r.lock
monopole is taken in this function), Halt (the actual removal of the channel is expected here)r.lock
monopole.==================================
The error in the raft tests is due to the struggle for monopoly control of r.lock in the SwitchChainToFollower and RemoveChannel functions.
RemoveChannel grabs monopoly control and waits for the channel to terminate. During termination, SwitchChainToFollower tries to grab monopoly control and fails.
Here is my variant of solving the error. If someone suggests a more correct and reddish way, it would be great.