Closed chenhong1990 closed 1 month ago
Hey @chenhong1990, great to see you back! 🚀
Based on the information you've provided and the context from the repository, it seems like there might be a misconfiguration in your setup that's causing the graphs not to sync across nodes, while properties do. Here are some potential areas to look into:
RPC Configuration: The RPC (Remote Procedure Call) settings are crucial for inter-node communication and data synchronization. Ensure that the RPC_SERVER_HOST
, RPC_SERVER_PORT
, RPC_REMOTE_URL
, and related timeout settings are correctly configured. Also, make sure that all nodes in the cluster use the same RPC communication protocol. The bolt
protocol is generally a good choice for internal communication within a cluster, but depending on your environment, other protocols like rest
, dubbo
, h2c
, or http
might be more appropriate. You can refer to the RpcOptions.java file for more details.
Cluster Configuration: The FanoutCluster
class is used for broadcasting messages to all nodes. If the cluster configuration is not set to "fanout" for graph-related operations, it might result in graphs not syncing across nodes. This is configured in the consumerConfig
method with consumerConfig.setCluster("fanout");
. If this is not properly set, only the default cluster configuration (likely "failover") is used, which does not broadcast updates to all nodes.
Direct URL Configuration: The setDirectUrl
method is used to specify the direct URLs of the providers. If the remoteUrls
provided to the RpcConsumerConfig
constructor are incorrect or not all node URLs are included, it could lead to a situation where graph updates are not propagated to all nodes. This is configured with .setDirectUrl(this.remoteUrls);
in the consumerConfig
method.
Service ID Configuration: The service ID is crucial for identifying the correct service across the cluster. If there is a mismatch in the service ID due to incorrect graph or interface ID (serviceId = interfaceId + ":" + graph;
), it could lead to failures in syncing graphs across nodes because the service proxy might not correctly refer to the intended service.
Timeout and Retry Configurations: Misconfigured timeout and retry settings (setTimeout
, setConnectTimeout
, setReconnectPeriod
, setRetries
) could lead to premature timeouts or insufficient retries for graph synchronization operations across the cluster. This might not directly cause graphs not to sync, but it could exacerbate issues in a network with latency or intermittent connectivity problems.
Load Balancer Configuration: The load balancer is set with .setLoadBalancer(loadBalancer);
. If the load balancer configuration does not properly distribute operations across all nodes, or if it's not set to a configuration that supports even distribution (depending on the cluster's requirements), it could lead to uneven graph state across the cluster.
Please review these configurations and adjust them as necessary. If you're still experiencing issues, it would be helpful to have more information about your setup, such as the configurations of the other nodes in the cluster, any error messages you're seeing, and more details about the behavior you're observing.
Due to the lack of activity, the current issue is marked as stale and will be closed after 20 days, any update will remove the stale label
Problem Type (问题类型)
configs (配置项 / 文档相关)
Before submit
Environment (环境信息)
Your Question (问题描述)
1、怎么配置hugegraph1.2.0集群? 2、我现在配置了集群,可能配置错误,导致了在主节点新建了图,未同步到其他节点,但是我在默认图中创建的属性同步到其他节点上,是配置文件哪里没有配置好吗?
我的主节点配置如下:
gremlin entrance to create graph
auth config: org.apache.hugegraph.auth.HugeFactoryAuthProxy
gremlin.graph=org.apache.hugegraph.HugeFactory
gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy
cache config
schema.cache_capacity=100000
vertex-cache default is 1000w, 10min expired
vertex.cache_type=l2
vertex.cache_capacity=10000000
vertex.cache_expire=600
edge-cache default is 100w, 10min expired
edge.cache_type=l2
edge.cache_capacity=1000000
edge.cache_expire=600
schema illegal name template
schema.illegal_name_regex=\s+|~.*
vertex.default_label=vertex
backend=rocksdb serializer=binary
store=hugegraph
raft.mode=true raft.path=./raft-log raft.safe_read=true raft.use_replicator_pipeline=true raft.election_timeout=10000 raft.snapshot_interval=3600 raft.backend_threads=48 raft.read_index_threads=8 raft.snapshot_threads=4 raft.snapshot_parallel_compress=false raft.snapshot_compress_threads=4 raft.snapshot_decompress_threads=4 raft.read_strategy=ReadOnlyLeaseBased raft.queue_size=16384 raft.queue_publish_timeout=60 raft.apply_batch=1 raft.rpc_threads=80 raft.rpc_connect_timeout=5000 raft.rpc_timeout=60 raft.install_snapshot_rpc_timeout=36000 raft.endpoint=172.30.96.162:8091 raft.group_peers=172.30.96.162:8091,172.30.96.139:8091,172.30.96.182:8091
search.text_analyzer=jieba search.text_analyzer_mode=INDEX
rocksdb backend config
rocksdb.data_path=/data/hugegraph1.2.0/apache-hugegraph-incubating-1.2.0/data/hugegraph rocksdb.wal_path=/data/hugegraph1.2.0/apache-hugegraph-incubating-1.2.0/wal/hugegraph
Vertex/Edge example (问题点 / 边数据举例)
No response
Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
No response