集群只启动了一个 meta服务在测试 但是无限选举睡眠

配置文件

########## basics ##########
# Whether to run as a daemon process
--daemonize=true
# The file to host the process id
--pid_file=pids/nebula-metad.pid

########## logging ##########
# The directory to host logging files
--log_dir=logs
# Log level, 0, 1, 2, 3 for INFO, WARNING, ERROR, FATAL respectively
--minloglevel=0
# Verbose log level, 1, 2, 3, 4, the higher of the level, the more verbose of the logging
--v=0
# Maximum seconds to buffer the log messages
--logbufsecs=0
# Whether to redirect stdout and stderr to separate output files
--redirect_stdout=true
# Destination filename of stdout and stderr, which will also reside in log_dir.
--stdout_log_file=metad-stdout.log
--stderr_log_file=metad-stderr.log
# Copy log messages at or above this level to stderr in addition to logfiles. The numbers of severity levels INFO, WARNING, ERROR, and FATAL are 0, 1, 2, and 3, respectively.
--stderrthreshold=2
# wether logging files' name contain time stamp, If Using logrotate to rotate logging files, than should set it to true.
--timestamp_in_logfile_name=true

########## networking ##########
# Comma separated Meta Server addresses
--meta_server_addrs=nebula-meta2-aliyun:9559,nebula-meta1-aliyun:9559,nebula-meta3-aliyun:9559
# Local IP used to identify the nebula-metad process.
# Change it to an address other than loopback if the service is distributed or
# will be accessed remotely.
--local_ip=nebula-meta2-aliyun
# Meta daemon listening port
--port=9559
# HTTP service ip
--ws_ip=0.0.0.0
# HTTP service port
--ws_http_port=19559
# Port to listen on Storage with HTTP protocol, it corresponds to ws_http_port in storage's configuration file
--ws_storage_http_port=19779


########## storage ##########
# Root data path, here should be only single path for metad
--data_path=data/meta

########## Misc #########
# The default number of parts when a space is created
--default_parts_num=100
# The default replica factor when a space is created
--default_replica_factor=1

--heartbeat_interval_secs=10
--agent_heartbeat_interval_secs=60

正常来说 虽然配置文件配置了3个metad服务,目前只有一个metad服务时 不是应该自动选举为leader吗


这是我将3个metad服务全部启动后 的正常日志

这个不是这么理解的啊 :innocent:
既然配了3个meta就是要保证meta高可用,写入meta的数据必须要保存副本,只有1个meta的情况下无法保证这一点,目前这个行为并没有问题的。

所以说 两个meta就可以?还是默认几个meta服务器就几个副本 只要有一个meta服务挂了 就整个集群瘫痪

参考下这个 准备资源 - Nebula Graph Database 手册
生产环境建议3个meta,这个情况下如果有两个meta在应该还是可以用的。

已经在用了,你们可以测下,不过感觉一个meta就不能使用 最好视为bug吧 ,毕竟这单点故障都不算了 至少要两个正常运行的metad集群才可以正常运行

前面解释了,你配了3个meta,只剩1个meta,集群不工作应该是预期的行为,我不认为是bug,正常生产环境下,2个meta同时挂掉的概率不高吧。

此话题已在最后回复的 7 天后被自动关闭。不再允许新回复。