Hello team - I just switched over to 1.1.0 and changed from
VersionType.EXTERNAL to VersionType.EXTERNAL_GTE. Ever since then, we are
seeing the error below.
Any comments?
I looked at ES code and see this newly added line for EXTERNAL_GTE. Does it
mean we dont support zero as a valid version number? Our systems use zero
as the start version number.
@Override
public boolean validateVersion(long version) {
return version > 0L;
}
org.elasticsearch.action.ActionRequestValidationException: Validation
Failed: 1: illegal version value [0] for version type [EXTERNAL_GTE];
at
org.elasticsearch.action.ValidateActions.addValidationError(ValidateActions.java:29)
at
org.elasticsearch.action.index.IndexRequest.validate(IndexRequest.java:181)
at
org.elasticsearch.action.TransportActionNodeProxy.execute(TransportActionNodeProxy.java:63)
at
org.elasticsearch.client.transport.support.InternalTransportClient$2.doWithNode(InternalTransportClient.java:109)
at
org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:228)
at
org.elasticsearch.client.transport.support.InternalTransportClient.execute(InternalTransportClient.java:106)
at
org.elasticsearch.client.support.AbstractClient.index(AbstractClient.java:82)
at
org.elasticsearch.client.transport.TransportClient.index(TransportClient.java:330)
at
org.elasticsearch.action.index.IndexRequestBuilder.doExecute(IndexRequestBuilder.java:314)
at
org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:85)
at
org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:59)
Also to add: it seems that even VersionType.EXTERNAL is broken in the new
version (1.1.0) since it now does the validation of input version number
and it does not allow a save if the input version number is zero.
Looking for inputs from ES team on how to proceed on this.
Hello team - I just switched over to 1.1.0 and changed from
VersionType.EXTERNAL to VersionType.EXTERNAL_GTE. Ever since then, we are
seeing the error below.
Any comments?
I looked at ES code and see this newly added line for EXTERNAL_GTE. Does
it mean we dont support zero as a valid version number? Our systems use
zero as the start version number.
@Override
public boolean validateVersion(long version) {
return version > 0L;
}
org.elasticsearch.action.ActionRequestValidationException: Validation
Failed: 1: illegal version value [0] for version type [EXTERNAL_GTE];
at
org.elasticsearch.action.ValidateActions.addValidationError(ValidateActions.java:29)
at
org.elasticsearch.action.index.IndexRequest.validate(IndexRequest.java:181)
at
org.elasticsearch.action.TransportActionNodeProxy.execute(TransportActionNodeProxy.java:63)
at
org.elasticsearch.client.transport.support.InternalTransportClient$2.doWithNode(InternalTransportClient.java:109)
at
org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:228)
at
org.elasticsearch.client.transport.support.InternalTransportClient.execute(InternalTransportClient.java:106)
at
org.elasticsearch.client.support.AbstractClient.index(AbstractClient.java:82)
at
org.elasticsearch.client.transport.TransportClient.index(TransportClient.java:330)
at
org.elasticsearch.action.index.IndexRequestBuilder.doExecute(IndexRequestBuilder.java:314)
at
org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:85)
at
org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:59)
Also to add: it seems that even VersionType.EXTERNAL is broken in the new
version (1.1.0) since it now does the validation of input version number
and it does not allow a save if the input version number is zero.
Looking for inputs from ES team on how to proceed on this.
Hello team - I just switched over to 1.1.0 and changed from
VersionType.EXTERNAL to VersionType.EXTERNAL_GTE. Ever since then, we are
seeing the error below.
Any comments?
I looked at ES code and see this newly added line for EXTERNAL_GTE. Does
it mean we dont support zero as a valid version number? Our systems use
zero as the start version number.
@Override
public boolean validateVersion(long version) {
return version > 0L;
}
org.elasticsearch.action.ActionRequestValidationException: Validation
Failed: 1: illegal version value [0] for version type [EXTERNAL_GTE];
at
org.elasticsearch.action.ValidateActions.addValidationError(ValidateActions.java:29)
at
org.elasticsearch.action.index.IndexRequest.validate(IndexRequest.java:181)
at
org.elasticsearch.action.TransportActionNodeProxy.execute(TransportActionNodeProxy.java:63)
at
org.elasticsearch.client.transport.support.InternalTransportClient$2.doWithNode(InternalTransportClient.java:109)
at
org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:228)
at
org.elasticsearch.client.transport.support.InternalTransportClient.execute(InternalTransportClient.java:106)
at
org.elasticsearch.client.support.AbstractClient.index(AbstractClient.java:82)
at
org.elasticsearch.client.transport.TransportClient.index(TransportClient.java:330)
at
org.elasticsearch.action.index.IndexRequestBuilder.doExecute(IndexRequestBuilder.java:314)
at
org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:85)
at
org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:59)
Thank you for reporting this, the plan is to revert back and allow 0 for
external versioning. Not sure yet when it will be but likely in the next 1
or 2 releases.
Thank you for reporting this, the plan is to revert back and allow 0 for
external versioning. Not sure yet when it will be but likely in the next 1
or 2 releases.
One solid work-around is to always create the index before you bulk-load
it. Either with explicit mappings or letting ES guess them by default
should work fine. It should get you by until the bug is fixed in a future
release, and should be rather easy to implement.
In my case, I lock down ES to prevent auto-index creation and auto-create
of unmapped fields, so I must always create the index and its mappings
before loading data into the index. This means that I haven't run into this
bug. And it's not a bad workaround; in fact, it is a very good practice.
Sometimes ES guesses wrong. It can't read my mind, so I don't expect it to.
Hi Brian - Thanks for the response, appreciate it. I am not sure if I
understand this solution completely. We already create the index in advance
(we use strict mapping and we have also disabled dynamic creation of new
types) and then only we start indexing. We however supply the version
number from our DB and that is where version number of zero comes in from.
One solid work-around is to always create the index before you bulk-load
it. Either with explicit mappings or letting ES guess them by default
should work fine. It should get you by until the bug is fixed in a future
release, and should be rather easy to implement.
In my case, I lock down ES to prevent auto-index creation and auto-create
of unmapped fields, so I must always create the index and its mappings
before loading data into the index. This means that I haven't run into this
bug. And it's not a bad workaround; in fact, it is a very good practice.
Sometimes ES guesses wrong. It can't read my mind, so I don't expect it to.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.