Skip to content

Pass on maxUnsafeAutoIdTimestamp on recovery / relocation#20300

Merged
s1monw merged 4 commits intoelastic:masterfrom
s1monw:replicate_max_safe_timestamp
Sep 2, 2016
Merged

Pass on maxUnsafeAutoIdTimestamp on recovery / relocation#20300
s1monw merged 4 commits intoelastic:masterfrom
s1monw:replicate_max_safe_timestamp

Conversation

@s1monw
Copy link
Copy Markdown
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/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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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/Distributed A catch all label for anything in the Distributed Area. Please avoid if you can. :Distributed/Engine Anything around managing Lucene and the Translog in an open shard. and removed :Translog :Distributed/Distributed A catch all label for anything in the Distributed 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/Engine Anything around managing Lucene and the Translog in an open shard. :Distributed/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