Skip to content
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

Get frequent SuspectedDown on localhost #48

Closed
mosuka opened this issue Jun 17, 2021 · 2 comments · Fixed by #50
Closed

Get frequent SuspectedDown on localhost #48

mosuka opened this issue Jun 17, 2021 · 2 comments · Fixed by #50

Comments

@mosuka
Copy link

mosuka commented Jun 17, 2021

I am building an application using artillery-core by referring to the sample here.

https://github.com/bastion-rs/artillery/blob/master/artillery-core/examples/cball_infection.rs

I have successfully brought up a three-node cluster, but when I start the third node, I get frequent SuspectedDown.
Even with a two-node cluster, there is no problem in the beginning, but after a few minutes, the SuspectedDown may occur.
What can I do to solve this problem?

@fulmicoton
Copy link
Contributor

fulmicoton commented Jun 21, 2021

The following code is suspicious.
https://github.com/bastion-rs/artillery/blob/master/artillery-core/src/epidemic/state.rs#L265-L269

        let (remaining, expired): (Vec<_>, Vec<_>) = self
            .pending_responses
            .iter()
            .cloned()
            .partition(|&(t, _, _)| t < now);

Shouldn't it be the opposite?
An expired element is one for which (now>deadline), which is the second argumnet.

Aren't expired and remaining inverted.

fulmicoton added a commit to fulmicoton/artillery that referenced this issue Jun 21, 2021
The timeout logic was inverted. A timeout is when now > deadline.

Closes bastion-rs#48.
@fulmicoton
Copy link
Contributor

Is there a plan to publish the crate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants