-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Description
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