fxxkgw

es 集群中不同节点拿到全量数据不一致

  •  1
     
  •   fxxkgw · May 17, 2019 · 7284 views
    This topic created in 2569 days ago, the information mentioned may be changed or developed.

    我的 ES 小集群由 3 台服务器组成
    {
    "cluster_name" : "elasticsearch",
    "status" : "green",
    "timed_out" : false,
    "number_of_nodes" : 3,
    "number_of_data_nodes" : 3,
    "active_primary_shards" : 50,
    "active_shards" : 100,
    "relocating_shards" : 0,
    "initializing_shards" : 0,
    "unassigned_shards" : 0,
    "delayed_unassigned_shards" : 0,
    "number_of_pending_tasks" : 0,
    "number_of_in_flight_fetch" : 0,
    "task_max_waiting_in_queue_millis" : 0,
    "active_shards_percent_as_number" : 100.0
    }

    通过 _cat/indices 查到索引的 docs.count 数量为 10W
    通过脚本
    from elasticsearch import Elasticsearch, helpers

    es = Elasticsearch()
    query = {"query": {"match_all": {}}}
    scan_resp = helpers.scan(client=es, query=query, scroll="10m", index="index", doc_type="doc", timeout="10m")
    for es_info in scan_resp:
    pass

    方法每次只能拿到 9W 多条数据,会随机漏掉几百条。
    同样的脚本,放到服务器另一台上执行,可以拿全。
    三台机器组成的集群,有两台(一台 master 一台 slave )会出现漏,一台正常( slave ),上述情况必现的...
    怎么排查这个问题呢?

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1097 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 17:58 · PVG 01:58 · LAX 10:58 · JFK 13:58
    ♥ Do have faith in what you're doing.