Elasticsearch version: 5.3
Plugins installed: []
JVM version: 1.8
OS version: MacOS
Description of the problem including expected versus actual behavior:
Remote reindex sends an invalid request to the source ES when requests_per_second is specified.
Problem is most likely in org.elasticsearch.index.reindex.remote.RemoteRequestBuilders.java method scrollParams calls keepAlive.toString() on TimeValue object.
But TimeValue.toString comment says:
Note that this method might produce fractional time values (ex 1.6m) which cannot be parsed by method like ...
Steps to reproduce:
- start a remote reindex with parameter requests_per_second specified
- source database responses with HTTP 200 but includes error "fractional time values are not supported"
EXPECTED - remote reindex should run ok
Provide logs (if relevant):
{
"completed": true,
"error": {
"caused_by": {
"reason": "POST https://company.com:443/_search/scroll?scroll=5.1m: HTTP/1.1 400 Bad Request\n{\"error\":{\"root_cause\":[{\"type\":\"parse_exception\",\"reason\":\"failed to parse [5.1m], fractional time values are not supported\"}],\"type\":\"parse_exception\",\"reason\":\"failed to parse [5.1m], fractional time values are not supported\",\"caused_by\":{\"type\":\"number_format_exception\",\"reason\":\"For input string: \\\"5.1\\\"\"}},\"status\":400}",
"type": "response_exception"
},
"reason": "body={\"error\":{\"root_cause\":[{\"type\":\"parse_exception\",\"reason\":\"failed to parse [5.1m], fractional time values are not supported\"}],\"type\":\"parse_exception\",\"reason\":\"failed to parse [5.1m], fractional time values are not supported\",\"caused_by\":{\"type\":\"number_format_exception\",\"reason\":\"For input string: \\\"5.1\\\"\"}},\"status\":400}",
"type": "status_exception"
},
"task": {
"action": "indices:data/write/reindex",
"cancellable": true,
"description": "reindex from [scheme=https host=company.com port=443 query={\n \"match_all\" : {\n \"boost\" : 1.0\n }\n}][index1] to [index1]",
"id": 25587,
"node": "7LvaOqfdSZGsfRWElVkqIA",
"running_time_in_nanos": 10876439850,
"start_time_in_millis": 1491479089618,
"status": {
"batches": 1,
"created": 0,
"deleted": 0,
"noops": 0,
"requests_per_second": 100.0,
"retries": {
"bulk": 0,
"search": 0
},
"throttled_millis": 0,
"throttled_until_millis": 0,
"total": 19433,
"updated": 0,
"version_conflicts": 1000
},
"type": "transport"
}
}
Elasticsearch version: 5.3
Plugins installed: []
JVM version: 1.8
OS version: MacOS
Description of the problem including expected versus actual behavior:
Remote reindex sends an invalid request to the source ES when
requests_per_secondis specified.Problem is most likely in
org.elasticsearch.index.reindex.remote.RemoteRequestBuilders.javamethodscrollParamscallskeepAlive.toString()onTimeValueobject.But
TimeValue.toStringcomment says:Steps to reproduce:
EXPECTED - remote reindex should run ok
Provide logs (if relevant):
{ "completed": true, "error": { "caused_by": { "reason": "POST https://company.com:443/_search/scroll?scroll=5.1m: HTTP/1.1 400 Bad Request\n{\"error\":{\"root_cause\":[{\"type\":\"parse_exception\",\"reason\":\"failed to parse [5.1m], fractional time values are not supported\"}],\"type\":\"parse_exception\",\"reason\":\"failed to parse [5.1m], fractional time values are not supported\",\"caused_by\":{\"type\":\"number_format_exception\",\"reason\":\"For input string: \\\"5.1\\\"\"}},\"status\":400}", "type": "response_exception" }, "reason": "body={\"error\":{\"root_cause\":[{\"type\":\"parse_exception\",\"reason\":\"failed to parse [5.1m], fractional time values are not supported\"}],\"type\":\"parse_exception\",\"reason\":\"failed to parse [5.1m], fractional time values are not supported\",\"caused_by\":{\"type\":\"number_format_exception\",\"reason\":\"For input string: \\\"5.1\\\"\"}},\"status\":400}", "type": "status_exception" }, "task": { "action": "indices:data/write/reindex", "cancellable": true, "description": "reindex from [scheme=https host=company.com port=443 query={\n \"match_all\" : {\n \"boost\" : 1.0\n }\n}][index1] to [index1]", "id": 25587, "node": "7LvaOqfdSZGsfRWElVkqIA", "running_time_in_nanos": 10876439850, "start_time_in_millis": 1491479089618, "status": { "batches": 1, "created": 0, "deleted": 0, "noops": 0, "requests_per_second": 100.0, "retries": { "bulk": 0, "search": 0 }, "throttled_millis": 0, "throttled_until_millis": 0, "total": 19433, "updated": 0, "version_conflicts": 1000 }, "type": "transport" } }