Skip to content

Conversation

@s1monw
Copy link
Contributor

@s1monw s1monw commented Sep 2, 2016

To ensure we don't add documents more than once even if it's mostly paranoia
except of one case where we relocated a shards away and back to the same node
while an initial request is in flight but has not yet finished AND is retried.

Yet, this is a possible case and for that reason we ensure we pass on the
maxUnsafeAutoIdTimestamp on when we prepare for translog recovery.

To ensure we don't add documents more than once even if it's mostly paranoia
except of one case where we relocated a shards away and back to the same node
while an initial request is in flight but has not yet finished AND is retried.

Yet, this is a possible case and for that reason we ensure we pass on the
maxUnsafeAutoIdTimestamp on when we prepare for translog recovery.
@s1monw s1monw added >enhancement review :Distributed Indexing/Recovery Anything around constructing a new shard, either from a local or a remote source. v5.0.0-beta1 labels Sep 2, 2016
shards.flush();
}
IndexShard replica = shards.addReplica();
shards.recoverReplica(replica, (r, sourceNode) -> new RecoveryTarget(r, sourceNode, recoveryListener, version -> {}));
Copy link
Contributor

Choose a reason for hiding this comment

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

we should probably add an overload for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

++

@bleskes
Copy link
Contributor

bleskes commented Sep 2, 2016

LGTM.

PS. Relates to #20211

@s1monw s1monw merged commit c992a00 into elastic:master Sep 2, 2016
@s1monw s1monw deleted the replicate_max_safe_timestamp branch September 2, 2016 19:08
@clintongormley clintongormley added :Distributed Indexing/Distributed A catch all label for anything in the Distributed Indexing Area. Please avoid if you can. :Distributed Indexing/Engine Anything around managing Lucene and the Translog in an open shard. and removed :Translog :Distributed Indexing/Distributed A catch all label for anything in the Distributed Indexing Area. Please avoid if you can. labels Feb 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed Indexing/Engine Anything around managing Lucene and the Translog in an open shard. :Distributed Indexing/Recovery Anything around constructing a new shard, either from a local or a remote source. >enhancement v5.0.0-beta1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants