We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
GetNextId
zk: node does not exist
What happened:
when I call GetNextId API in layotto that use zookeeper as its component, I got an error, zk: node does not exist, as below:
What you expected to happen:
Get a unique ID
How to reproduce it (as minimally and precisely as possible):
./layotto start -c configs/config_zookeeper.json
cli, err := client.NewClientWithAddress("127.0.0.1:34904") resp, err := cli.GetNextId(ctx, &runtimev1pb.GetNextIdRequest{ StoreName: "sequencer_demo", Key: sequencerKey, })
Anything else we need to know?:
solution A: we can add a method createOrUpdate to implement the logic that create a zk node when it doesn't exist or update it directly.
createOrUpdate
solution B: add a method isExist to check if the request node has been created
isExist
The text was updated successfully, but these errors were encountered:
方法的实现在这个文件里面进行吗
Sorry, something went wrong.
@bxiiiiii 不能在这里加,不然别人用不了,一个是你在我上面那个接口里面加,一个是你可以在GetNextId的实现里面不直接Set 而是先判断一下是否存在再set
Successfully merging a pull request may close this issue.
What happened:
when I call
GetNextId
API in layotto that use zookeeper as its component, I got an error,zk: node does not exist
, as below:What you expected to happen:
Get a unique ID
How to reproduce it (as minimally and precisely as possible):
./layotto start -c configs/config_zookeeper.json
GetNextId
, maybe as follows:Anything else we need to know?:
solution A:
we can add a method
createOrUpdate
to implement the logic that create a zk node when it doesn't exist or update it directly.solution B:
add a method
isExist
to check if the request node has been createdThe text was updated successfully, but these errors were encountered: