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

Don't throw DAEE on replica for create operation; use IW.updateDocument/s instead #7146

Closed
wants to merge 3 commits into from

Conversation

Projects
None yet
4 participants
@mikemccand
Copy link
Contributor

commented Aug 4, 2014

This is for #7142: if we are on a replica doing a create, instead of throwing DAEE when the doc is in the index with an older version, we just call IW.updateDocument/s, because the primary already "decided" the document should be indexed.

@mikemccand mikemccand added review and removed v1.2.0 labels Aug 4, 2014

@kimchy

This comment has been minimized.

Copy link
Member

commented Aug 4, 2014

I think that now a replica by definition should not throw a DAEE, we should remove it from TransportShardReplicationOperationAction#ignoreReplicaException, other than that, LGTM.

@mikemccand

This comment has been minimized.

Copy link
Contributor Author

commented Aug 4, 2014

Oh that's great, I'll remove exemption of DAEE from there.

@mikemccand

This comment has been minimized.

Copy link
Contributor Author

commented Aug 4, 2014

OK I removed DAEE from exemption list; I'll commit & close shortly...

@mikemccand mikemccand closed this in a58d9a1 Aug 4, 2014

mikemccand added a commit that referenced this pull request Aug 4, 2014

Core: simultaneous create/delete against same id can cause silently i…
…nconsistent replica

If simultaneous create & delete operations arrive against the same id,
it's possible that primary and replica see those operations in
different orders, which may result in replica throwing
DocumentAlreadyExistsException when the primary didn't which would
lead to replica being inconsistent (missing a document that primary
had indexed).

This push fixes the issue, by never throwing DAEE from the replica on
create.

Closes #7146 #7142

mikemccand added a commit that referenced this pull request Aug 6, 2014

Core: simultaneous create/delete against same id can cause silently i…
…nconsistent replica

If simultaneous create & delete operations arrive against the same id,
it's possible that primary and replica see those operations in
different orders, which may result in replica throwing
DocumentAlreadyExistsException when the primary didn't which would
lead to replica being inconsistent (missing a document that primary
had indexed).

This push fixes the issue, by never throwing DAEE from the replica on
create.

Closes #7146 #7142

@jpountz jpountz removed the review label Aug 11, 2014

@mikemccand mikemccand removed v1.4.0 labels Aug 12, 2014

mikemccand added a commit that referenced this pull request Sep 8, 2014

Core: simultaneous create/delete against same id can cause silently i…
…nconsistent replica

If simultaneous create & delete operations arrive against the same id,
it's possible that primary and replica see those operations in
different orders, which may result in replica throwing
DocumentAlreadyExistsException when the primary didn't which would
lead to replica being inconsistent (missing a document that primary
had indexed).

This push fixes the issue, by never throwing DAEE from the replica on
create.

Closes #7146 #7142

@clintongormley clintongormley changed the title Don't throw DAEE on replica for create operation; use IW.updateDocument/s instead Indexing: Don't throw DAEE on replica for create operation; use IW.updateDocument/s instead Sep 11, 2014

@clintongormley clintongormley changed the title Indexing: Don't throw DAEE on replica for create operation; use IW.updateDocument/s instead Don't throw DAEE on replica for create operation; use IW.updateDocument/s instead Jun 7, 2015

mute pushed a commit to mute/elasticsearch that referenced this pull request Jul 29, 2015

Core: simultaneous create/delete against same id can cause silently i…
…nconsistent replica

If simultaneous create & delete operations arrive against the same id,
it's possible that primary and replica see those operations in
different orders, which may result in replica throwing
DocumentAlreadyExistsException when the primary didn't which would
lead to replica being inconsistent (missing a document that primary
had indexed).

This push fixes the issue, by never throwing DAEE from the replica on
create.

Closes elastic#7146 elastic#7142
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.