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

fix-update-document-options-not-set #1047

Merged
merged 1 commit into from
Mar 15, 2017

Conversation

olchick
Copy link
Contributor

@olchick olchick commented Feb 14, 2016

Comes from 1046

Improvement for updateDocument method: not set option 'retry_on_conflict' if it is empty in Client's config.

@olchick olchick force-pushed the fix-update-document-options-not-set branch from ca5e410 to 2947ac5 Compare February 14, 2016 18:13
@ewgRa
Copy link
Contributor

ewgRa commented Feb 15, 2016

@olchick For me it seems like broke BC.

For now Elastica always sends retry_on_conflict=0 by default. With your PR it will be taken from elasticsearch configuration and it can be not 0, for such developers it will be broke BC.

More right make something like "unsetConfig('retry_on_conflict')" or "setConfig('retry_on_conflict', null)" and than client can omit it when perform request.

Also what with 'version' field from original issue? I think if Amazon care about "retry_on_conflict" it will be also raise errors for "version", and your PR solve only retry_on_conflict.

@Tobion
Copy link
Collaborator

Tobion commented Mar 12, 2017

@ewgRa retry_on_conflict=0 is the default in ES. How is that possible to change that?

@ewgRa
Copy link
Contributor

ewgRa commented Mar 12, 2017

@Tobion https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html#_parameters_2

retry_on_conflict there

Or I misunderstand your question?

@Tobion
Copy link
Collaborator

Tobion commented Mar 12, 2017

You said there is a configuration which can be changed and due that not sending the default value would be a BC break for those people.

With your PR it will be taken from elasticsearch configuration and it can be not 0, for such developers it will be broke BC.

So what configuration are you talking about?

@ewgRa
Copy link
Contributor

ewgRa commented Mar 12, 2017

@Tobion you are right. By default it is "the update will fail with a version conflict exception", if it is omitted, also like "default", and all this work as "0".

So, there is will be no BC break.

@Tobion
Copy link
Collaborator

Tobion commented Mar 13, 2017

Good, then I think this is good to be merged.

@ruflin
Copy link
Owner

ruflin commented Mar 15, 2017

@Tobion Didn't check this one in detail. If it looks good, feel free to merge. @olchick Can you potentially add an entry to the changelog?

@Tobion Tobion merged commit a9c69f1 into ruflin:master Mar 15, 2017
Tobion added a commit that referenced this pull request Mar 15, 2017
@Tobion
Copy link
Collaborator

Tobion commented Mar 15, 2017

Added changelog

mhernik pushed a commit to mhernik/Elastica that referenced this pull request Jul 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants