Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HA数据同步问题 #845

Open
masteroogway123 opened this issue Jan 16, 2025 · 7 comments
Open

HA数据同步问题 #845

masteroogway123 opened this issue Jan 16, 2025 · 7 comments

Comments

@masteroogway123
Copy link

搭建HA发现备节点加入集群时可以一次性同步主节点数据,之后再向主节点写入数据,备节点数据并无变化。
使用web控制台操作,取的是最新版本,在主节点执行的命令是类似:create (n: abc {name: 'a1', id: 10000, age: 25})
不知道是哪边配置错误,还是命令执行有误?

@gtahoo
Copy link
Collaborator

gtahoo commented Jan 16, 2025

是用bolt执行的么?目前bolt的高可用还在开发中。可以先用TuGraph Java SDK。

@masteroogway123
Copy link
Author

OK,使用Java SDK确实可以同步数据了。
还有一个问题:假如出现了数据不一致,那如何解决呢?重启了备节点,发现没法重新同步主节点的数据。

@zhangwh807
Copy link
Collaborator

ha模式还没有支持bolt,4.5.0,4.5.1的新前端是走的bolt所以数据没有同步,你可以启用老的web。
可以通过修改容器内配置文件/usr/local/etc/lgraph.json指定老web

Image

@masteroogway123
Copy link
Author

一主多备的架构下,是否可以配置只能向主节点写数据,备节点只能读不能写?

@zhangwh807
Copy link
Collaborator

是的,只能向master节点写入

@masteroogway123
Copy link
Author

是的,只能向master节点写入

具体是由客户端保证还是服务端有相关的配置呢?

@zhangwh807
Copy link
Collaborator

在web上的从节点写入会有弹框提示非master节点禁止写入,通过SDK调用接口写入,请求会自动发到master节点上

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants