2014-10-10 82 views
1

我有一个正在播放的ES集群。有一次,我将所有主分片和复制分片正确地分配给了5个节点中的4个,但是为了让第5个节点上的某些节点再次丢失我的副本分片。现在我的主要碎片只存在于3个节点上。集群中未分配的碎片

我试图让这个问题的底部:

在努力,如强制分配:

{ 
    "commands": [ 
    { 
     "allocate": { 
     "index": "group7to11poc", 
     "shard": 7, 
     "node": "SPOCNODE1" 
     } 
    } 
    ] 
} 

我获得以下响应。我无法找到确切的问题!

explanations: [1] 
    0: { 
    command: "allocate" 
    parameters: { 
    index: "group7to11poc" 
    shard: 7 
    node: "SPOCNODE5" 
    allow_primary: true 
    }- 
decisions: [11] 
    0: { 
    decider: "same_shard" 
    decision: "YES" 
    explanation: "shard is not allocated to same node or host" 
    }- 
    1: { 
    decider: "filter" 
    decision: "NO" 
    explanation: "node does not match index include filters [_id:"4rZYPBOGRMK4y9YG6p7E2w"]" 
    }- 
    2: { 
    decider: "replica_after_primary_active" 
    decision: "YES" 
    explanation: "primary is already active" 
    }- 
    3: { 
    decider: "throttling" 
    decision: "YES" 
    explanation: "below shard recovery limit of [2]" 
    }- 
    4: { 
    decider: "enable" 
    decision: "YES" 
    explanation: "allocation disabling is ignored" 
    }- 
    5: { 
    decider: "disable" 
    decision: "YES" 
    explanation: "allocation disabling is ignored" 
    }- 
    6: { 
    decider: "awareness" 
    decision: "YES" 
    explanation: "no allocation awareness enabled" 
    }- 
    7: { 
    decider: "shards_limit" 
    decision: "YES" 
    explanation: "total shard limit disabled: [-1] <= 0" 
    }- 
    8: { 
    decider: "node_version" 
    decision: "YES" 
    explanation: "target node version [1.3.2] is same or newer than source node version [1.3.2]" 
    }- 
    9: { 
    decider: "disk_threshold" 
    decision: "YES" 
    explanation: "disk usages unavailable" 
    }- 
    10: { 
    decider: "snapshot_in_progress" 
    decision: "YES" 
    explanation: "shard not primary or relocation disabled" 
    }- 

回答

1

最后对此进行了排序。不知怎的,索引已经得到了应用于它的过滤器,防止了碎片分配和移动。

我删除了过滤器,并且集群开始行为。

卷曲-XPUT本地主机:9200 /测试/ _settings -D '{ “index.routing.allocation.include._id”: “”}'

这设置过滤器_id到空。这是以前填充并阻止过滤器匹配!

+1

感谢您的支持。刚刚解决了我的问题。 – David 2014-11-25 14:24:37

+0

先生,当我尝试强制分配分片时,我遇到了与上面相同的问题/错误。 我的问题是你如何弄清楚索引上的过滤器,因为我对此并不了解。 其次,过滤器如何阻止碎片移动或分配,主要原因是什么。 非常感谢。 – 2016-11-10 13:18:37