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

Do not ignore ConnectTransportException for shard replication operations #6813

Merged
merged 1 commit into from Jul 10, 2014

Conversation

dakrone
Copy link
Member

@dakrone dakrone commented Jul 10, 2014

A ConnectTransportException on replicating an index operation should fail the replica shard.

This case came out of the improve_zen branch for index requests that are mid-flight while partitioning is forced.

logger.info("--> primary shard is on {}", primaryNode);

// Index a document to make sure everything works well
internalCluster().client(primaryNode).prepareIndex(INDEX, "doc").setSource("foo", "bar").get();
Copy link
Member

Choose a reason for hiding this comment

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

maybe verify that this doc is indexed on both shard copies?

Copy link
Member Author

Choose a reason for hiding this comment

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

@martijnvg I'm trying to think of the best way to verify where the document exists on both shards, I guess just get the document count from the stats for each shard? Checking that the indexing op doesn't fail is kind of redundant for this, so it could be entirely removed.

@martijnvg
Copy link
Member

LGTM, left two minor comments


package org.elasticsearch.index;

import com.carrotsearch.ant.tasks.junit4.dependencies.com.google.common.collect.ImmutableSet;
Copy link
Member

Choose a reason for hiding this comment

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

can we import from our version Guava? I think we should add all of this to forbidden APIs at another pull request

Copy link
Member Author

Choose a reason for hiding this comment

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

Gah, yep, fixed this.

@kimchy
Copy link
Member

kimchy commented Jul 10, 2014

LGTM

A ConnectTransportException should fail the replica shard

Closes elastic#6183
@dakrone dakrone merged commit 107534c into elastic:master Jul 10, 2014
@dakrone dakrone removed the review label Jul 11, 2014
@clintongormley clintongormley changed the title Do not ignore ConnectTransportException for shard replication operations Resiliency: Do not ignore ConnectTransportException for shard replication operations Jul 16, 2014
@dakrone dakrone deleted the zen/replica-connect-exception branch December 12, 2014 16:27
@clintongormley clintongormley changed the title Resiliency: Do not ignore ConnectTransportException for shard replication operations Do not ignore ConnectTransportException for shard replication operations Jun 7, 2015
@lcawl lcawl added :Distributed/Distributed A catch all label for anything in the Distributed Area. If you aren't sure, use this one. and removed :Allocation labels Feb 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Distributed/Distributed A catch all label for anything in the Distributed Area. If you aren't sure, use this one. resiliency v1.3.0 v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants