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

Disallow `VersionType.FORCE` versioning for 6.x indices #20995

Merged
merged 2 commits into from Oct 19, 2016

Conversation

@dakrone
Copy link
Member

commented Oct 18, 2016

This is made up of two parts, a revert of b4cc3cd so force version is still available for 5.x indices, as well as a commit to disallow it for all 6.0+ indices.

Original commit message:

This was an error-prone version type that allowed overriding previous
version semantics. It could cause primaries and replicas to be out of
sync however, so it has been removed.

This is related to #20377, which removed the feature entirely. This
allows operations to continue to use the force version type if the
index was created before 6.0, in the event a document using it exists in
a translog being replayed.

Revert "Remove FORCE version_type"
This reverts commit b4cc3cd.
@bleskes
Copy link
Member

left a comment

LGTM, left a minor sanity check

core/src/test/java/org/elasticsearch/action/bulk/BulkWithUpdatesIT.java Outdated
@@ -239,7 +239,6 @@ public void testBulkVersioning() throws Exception {
.setDoc("field", "3").setVersion(13).setVersionType(VersionType.INTERNAL))
.get();

assertThat(bulkResponse.getItems()[0].getFailureMessage(), containsString("version conflict"));

This comment has been minimized.

Copy link
@bleskes

bleskes Oct 19, 2016

Member

this doesn't look like a rollback of b4cc3cd , are we sure it's ok?

This comment has been minimized.

Copy link
@dakrone

dakrone Oct 19, 2016

Author Member

You're right, I've re-added the assert.

Disallow VersionType.FORCE for 6.0+ indices
This was an error-prone version type that allowed overriding previous
version semantics. It could cause primaries and replicas to be out of
sync however, so it has been removed.

This is related to #20377, which removed the feature entirely. This
allows operations to continue to use the `force` version type if the
index was created before 6.0, in the event a document using it exists in
a translog being replayed.

@dakrone dakrone force-pushed the dakrone:readd-force-versioning branch to f4f62ab Oct 19, 2016

@dakrone dakrone merged commit f4f62ab into elastic:master Oct 19, 2016

1 check was pending

elasticsearch-ci Build started sha1 is merged.
Details
@dakrone

This comment has been minimized.

Copy link
Member Author

commented Oct 19, 2016

Thanks for reviewing @bleskes!

dakrone added a commit to dakrone/elasticsearch that referenced this pull request Oct 21, 2016
Disallow VersionType.FORCE for GetRequest
This doesn't make much sense to have at all, since a user can do a `GET`
request without a version of they want to get it unconditionally.

Relates to elastic#20995
dakrone added a commit to dakrone/elasticsearch that referenced this pull request Oct 26, 2016
Deprecate VersionType.FORCE
In elastic#20995 we are making `force` versioning a hard failure for newly
created indices, so in 5.0+ we need to deprecate it.
dakrone added a commit that referenced this pull request Oct 26, 2016
Deprecate VersionType.FORCE
In #20995 we are making `force` versioning a hard failure for newly
created indices, so in 5.0+ we need to deprecate it.
dakrone added a commit that referenced this pull request Nov 1, 2016
Disallow VersionType.FORCE for GetRequest (#21079)
This doesn't make much sense to have at all, since a user can do a `GET`
request without a version of they want to get it unconditionally.

Relates to #20995

@dakrone dakrone deleted the dakrone:readd-force-versioning branch Jan 23, 2017

@clintongormley clintongormley changed the title Re-add VersionType.FORCE versioning for BWC with 5.0 indices Disallow `VersionType.FORCE` versioning for 6.x indices May 5, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.