我的Elasticsearch集群从2B文档下降到900M条记录,在AWS上显示
重定位碎片:4
显示
活动碎片:35
和
活动主分区:34
(可能不相关,但这是其余统计信息):
节点数:9
数据节点数:6
未分配碎片:17
运行时
GET /_cluster/allocation/explain
它返回:
{
"index": "datauwu","shard": 6,"primary": true,"current_state": "unassigned","unassigned_info": {
"reason": "NODE_LEFT","at": "2019-10-31T17:02:11.258Z","details": "node_left[removedforsecuritybecimparanoid1]","last_allocation_status": "no_valid_shard_copy"
},"can_allocate": "no_valid_shard_copy","allocate_explanation": "cannot allocate because a previous copy of the primary shard existed but can no longer be found on the nodes in the cluster","node_allocation_decisions": [
{
"node_id": "removedforsecuritybecimparanoid2","node_name": "removedforsecuritybecimparanoid2","node_decision": "no","store": {
"found": false
}
},{
"node_id": "removedforsecuritybecimparanoid3","node_name": "removedforsecuritybecimparanoid3",{
"node_id": "removedforsecuritybecimparanoid4","node_name": "removedforsecuritybecimparanoid4",{
"node_id": "removedforsecuritybecimparanoid5","node_name": "removedforsecuritybecimparanoid5",{
"node_id": "removedforsecuritybecimparanoid6","node_name": "removedforsecuritybecimparanoid6",{
"node_id": "removedforsecuritybecimparanoid7","node_name": "removedforsecuritybecimparanoid7","store": {
"found": false
}
}
]
}
有点困惑,这到底是什么意思,这是否意味着我的Elasticsearch集群没有丢失数据,而是将其重新定位到了不同的分片中,还是找不到它?
如果找不到碎片,是否表示我的数据丢失了?如果是这样,可能是什么原因,我如何防止这种情况将来发生?
我没有建立副本,因为我正在索引数据,而副本在索引时会减慢速度。
也没有,我的记录数曾一度下降到400m,但随后又随机上升到900m。我不知道这意味着什么,任何见识将不胜感激。