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
Conversation
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(); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
LGTM, left two minor comments |
|
||
package org.elasticsearch.index; | ||
|
||
import com.carrotsearch.ant.tasks.junit4.dependencies.com.google.common.collect.ImmutableSet; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gah, yep, fixed this.
LGTM |
A ConnectTransportException should fail the replica shard Closes elastic#6183
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.