Skip to content

Conversation

@ywelsch
Copy link
Contributor

@ywelsch ywelsch commented Mar 12, 2019

Reduces the logging noise from the state recovery component when there are duelling elections.

Relates to #32006

@ywelsch ywelsch added >non-issue v7.0.0 :Distributed Coordination/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. v8.0.0 v7.2.0 labels Mar 12, 2019
@ywelsch ywelsch requested a review from DaveCTurner March 12, 2019 10:40
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

@ywelsch ywelsch mentioned this pull request Mar 12, 2019
61 tasks

@Override
public void onNoLongerMaster(String source) {
logger.debug("stepped down as master before recovering state [{}]", source);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do not we call resetRecoveredFlags here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch!

Copy link
Contributor

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I requested one change and asked a question too.


@Override
public void onNoLongerMaster(String source) {
logger.debug("stepped down as master before recovering state [{}]", source);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs a call to resetRecoveredFlags() too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct

// that resets it to false while a new recover is already running?
GatewayService.this.onFailure("state recovery failed: " + e.getMessage());
logger.warn("state recovery failed", e);
resetRecoveredFlags();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we resetRecoveredFlags() on failure of the scheduled task a few lines above this too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, added in 9de5c0e

Copy link
Contributor

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ywelsch ywelsch merged commit c3fe51c into elastic:master Mar 15, 2019
ywelsch added a commit that referenced this pull request Mar 15, 2019
…ry (#39950)

Reduces the logging noise from the state recovery component when there are duelling elections.

Relates to #32006
ywelsch added a commit that referenced this pull request Mar 15, 2019
…ry (#39950)

Reduces the logging noise from the state recovery component when there are duelling elections.

Relates to #32006
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed Coordination/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. >non-issue v7.0.0-rc1 v7.2.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants