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

Restore preference to latest unicast pings describing the same node #7702

Closed
Closed
Show file tree
Hide file tree
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 @@ -394,7 +394,8 @@ public void handleResponse(UnicastPingResponse response) {
// try and merge the best ping response for it, i.e. if the new one
// doesn't have the master node set, and the existing one does, then
// the existing one is better, so we keep it
if (pingResponse.master() != null) {
// if both have a master or both have none, we prefer the latest ping
if (existingResponse.master() == null || pingResponse.master() != null) {
responses.put(pingResponse.node(), pingResponse);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import com.google.common.base.Predicate;
import com.google.common.collect.Maps;
import org.apache.lucene.util.LuceneTestCase;
import org.elasticsearch.common.Nullable;
import org.elasticsearch.common.Strings;
import org.elasticsearch.index.shard.IndexShardState;
Expand All @@ -45,7 +44,6 @@
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;

@ClusterScope(scope = Scope.TEST, numDataNodes = 0)
@LuceneTestCase.AwaitsFix(bugUrl = "fails due to old ping responses confusing master elections, bleskes investigating")
public class IndicesLifecycleListenerTests extends ElasticsearchIntegrationTest {

@Test
Expand Down