Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,6 @@ public void testJoiningNodeReceivesFullState() {
assertEquals(0L, newNodePublishStats.getIncompatibleClusterStateDiffReceivedCount());
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/38867")
public void testIncompatibleDiffResendsFullState() {
final Cluster cluster = new Cluster(randomIntBetween(3, 5));
cluster.runRandomly();
Expand All @@ -884,12 +883,12 @@ public void testIncompatibleDiffResendsFullState() {
final PublishClusterStateStats prePublishStats = follower.coordinator.stats().getPublishStats();
logger.info("--> submitting first value to {}", leader);
leader.submitValue(randomLong());
cluster.runFor(DEFAULT_CLUSTER_STATE_UPDATE_DELAY + defaultMillis(PUBLISH_TIMEOUT_SETTING), "publish first state");
cluster.runFor(DEFAULT_CLUSTER_STATE_UPDATE_DELAY, "publish first state");
logger.info("--> healing {}", follower);
follower.heal();
logger.info("--> submitting second value to {}", leader);
leader.submitValue(randomLong());
cluster.stabilise(DEFAULT_CLUSTER_STATE_UPDATE_DELAY);
cluster.stabilise();
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 we should have an explicit duration here - we do not expect there to be an election so it should not be necessary to wait for a full stabilisation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would you like to suggest such a minimal bound? The point of this test is to check the cluster state diffing logic, not determine any kind of upper bound on stabilization after a follower has been unresponsive.

Copy link
Contributor

Choose a reason for hiding this comment

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

I haven't had time to do so, and would rather merge this PR than block on that.

final PublishClusterStateStats postPublishStats = follower.coordinator.stats().getPublishStats();
assertEquals(prePublishStats.getFullClusterStateReceivedCount() + 1,
postPublishStats.getFullClusterStateReceivedCount());
Expand Down