master节点日志

    [2018-12-08T09:20:44,182][WARN ][o.e.c.a.s.ShardStateAction] [ekm-m2] [tms-pro-order-66][9] received shard failed for shard id [[tms-pro-order-66][9]], allocation id [XOEz7GLgSpCtrwZEdyCMEA], primary term
    [0], message [shard failure, reason [search execution corruption failure]], failure [FetchPhaseExecutionException[Fetch Failed [Failed to fetch doc id [21267]]]; nested: CorruptIndexException[Corrupted:
    docID=21267, docBase=0, chunkDocs=0, numDocs=57488 (resource=MMapIndexInput(path=”/local/data/elasticsearch/0/nodes/0/indices/UFRA4PplRaqJqH0SwkqaYA/9/index/_dl1d.cfs”) [slice=_dl1d.fdt])]; ]
    org.elasticsearch.search.fetch.FetchPhaseExecutionException: Fetch Failed [Failed to fetch doc id [21267]]
    ………………………………………………………………………..
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_161]
    Caused by: org.apache.lucene.index.CorruptIndexException: Corrupted: docID=21267, docBase=0, chunkDocs=0, numDocs=57488 (resource=MMapIndexInput(path=”/local/data/elasticsearch/0/nodes/0/indices/UFRA4PplR
    aqJqH0SwkqaYA/9/index/_dl1d.cfs”) [slice=_dl1d.fdt])

    显示在tms-pro-order-66索引 shard9上查询数据失败,跟据关键报错信息判断数据文件有损坏
    https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-store.html
    https://discuss.elastic.co/t/mmapfs-vs-niofs/27965

    https://blog.csdn.net/laigood/article/details/8296678
    https://grh.am/2018/recovering-a-corrupted-elasticsearch-index-shard/

    查询有2个阶段的,第一阶段是query,第二阶段是fetch。
    ElasticSearch-索引分配失败-未完 - 图1

    Tips
    在 Elasticsearch 中,写入和打开一个新段的轻量的过程叫做 refresh 。 默认情况下每个分片会每秒自动刷新一次,如果是refresh延迟严重,那么就要控制索引的大小。把索引从磁盘里面刷入内存,索引设置过大负担会高,但索引太多又会影响读的效率,所以要权衡…可以尝试用roll
    https://qbox.io/blog/series/data-modelling-and-relationships-in-elasticsearch
    https://github.com/fdv/elasticsearch-cluster-design-definitive-guide