cluster.id作用

  • nebula 版本:v2
  • 部署方式(分布式 / 单机 / Docker / DBaaS):集群
  • 硬件信息
    • 磁盘( 推荐使用 SSD) HDD
    • CPU、内存信息:
      对于cluster.id有如下疑问:
      1、集群模式cluster.id的作用?
      2、删除(误删)cluster.id会有什么影响
      3、该常见问题(常见问题 FAQ - Nebula Graph Database 手册 )为什么要删除data文件,不能直接数据迁移吗

同问,cluster.id是不是启动顺序,

  1. 用来标识storage连接的哪个meta,否则一旦连错,会有各种问题。
  2. 误删可能会导致连不上meta。
  3. FAQ里说的好像是“主机先后加入过两个不同集群”, 不是数据迁移

cluster.id是meta servers的ip:port的一个hash

    static ClusterID create(const std::string& metaAddrs) {
        std::hash<std::string> hash_fn;
        auto clusterId = hash_fn(metaAddrs);
        uint64_t mask = 0x7FFFFFFFFFFFFFFF;
        clusterId &= mask;
        LOG(INFO) << "Create ClusterId " << clusterId;
        return clusterId;
    }