You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description of the problem including expected versus actual behavior:
In es 1.x generation, create index with config {"refresh_interval": "300"} is ok, but in es 2.2.1, create index with config {"refresh_interval": "300"}, the response is {"acknowledged":true} and index created, but no one shard is assigned, the message in log is
[error_info11][[error_info11][37]] ElasticsearchException[failed to create shard]; nested: ElasticsearchParseException[Failed to parse setting [index.refresh_interval] with value [300] as a time value: unit is missing or unrecognized]; at org.elasticsearch.index.IndexService.createShard(IndexService.java:371) at org.elasticsearch.indices.cluster.IndicesClusterStateService.applyInitializingShard(IndicesClusterStateService.java:602) at org.elasticsearch.indices.cluster.IndicesClusterStateService.applyNewOrUpdatedShards(IndicesClusterStateService.java:502) at org.elasticsearch.indices.cluster.IndicesClusterStateService.clusterChanged(IndicesClusterStateService.java:166) at org.elasticsearch.cluster.service.InternalClusterService.runTasksForExecutor(InternalClusterService.java:600) at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:762) at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:231) at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:194) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: ElasticsearchParseException[Failed to parse setting [index.refresh_interval] with value [300] as a time value: unit is missing or unrecognized]
So index is created, but you can't use
I know the true config is {"refresh_interval": "300s"}, but I think the response is error with error message and index created false rather than response is {"acknowledged":true} and created index yout can't use
In 2.x, units are required. In fact, units are there to help you avoid the mistake that you made. In 1.x, 300 means 300ms, not 300s! I agree that the action of creating the index but then failing on shard creation is poor. This has been fixed in 5.0 with #17187
I think the actual problem here is the {"acknowledged":true} is the problem here. In 5.0 this request would have been rejected so it's fixed in 5.0. Unfortunately backporting to 2.x is not feasible.
Elasticsearch version: 2.2.1
JVM version: 1.7.0_60
OS version: cent os
Description of the problem including expected versus actual behavior:
In es 1.x generation, create index with config {"refresh_interval": "300"} is ok, but in es 2.2.1, create index with config {"refresh_interval": "300"}, the response is {"acknowledged":true} and index created, but no one shard is assigned, the message in log is
[error_info11][[error_info11][37]] ElasticsearchException[failed to create shard]; nested: ElasticsearchParseException[Failed to parse setting [index.refresh_interval] with value [300] as a time value: unit is missing or unrecognized]; at org.elasticsearch.index.IndexService.createShard(IndexService.java:371) at org.elasticsearch.indices.cluster.IndicesClusterStateService.applyInitializingShard(IndicesClusterStateService.java:602) at org.elasticsearch.indices.cluster.IndicesClusterStateService.applyNewOrUpdatedShards(IndicesClusterStateService.java:502) at org.elasticsearch.indices.cluster.IndicesClusterStateService.clusterChanged(IndicesClusterStateService.java:166) at org.elasticsearch.cluster.service.InternalClusterService.runTasksForExecutor(InternalClusterService.java:600) at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:762) at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:231) at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:194) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: ElasticsearchParseException[Failed to parse setting [index.refresh_interval] with value [300] as a time value: unit is missing or unrecognized]
So index is created, but you can't use
I know the true config is {"refresh_interval": "300s"}, but I think the response is error with error message and index created false rather than response is {"acknowledged":true} and created index yout can't use
Steps to reproduce:
curl -XPOST dmslave22.et2:9200/test -d '{ "settings": { "refresh_interval": "300" }, "mappings": { "_default_":{ "properties": { "field1": { "type": "string" } } } } }'
Provide logs (if relevant):
Describe the feature:
Response for create index with config {"refresh_interval": "300"} is misleading
The text was updated successfully, but these errors were encountered: