Closed xkeyideal closed 2 years ago
Sorry but it is not very easy to actually understand what you really want to express.
Yes, it is very easy, and I use it in my application too. I use gossip meta sync datas. I call memberlist.UpdateNode, otherwise the metadata of this node will not be synchronized to other nodes.
You had see the issue, the dragonboat should be OK about sync gossip metadata. Thanks for your answer.
Dragonboat version
v3.3.5
The hashicorp/memberlist Delegate interfaces,
NodeMeta
method for the metadata store. Dragonboat framework use theNodeMeta
syncraftAddress
, but my gossip example codes also useNodeMeta
sync some datas, I see thememberlist
ansserf
source codes for useNodeMeta
method sync data, need callmemberlist.UpdateNode
method, the method will triggerNodeMeta
. I can't found thememberlist.UpdateNode
in dragonboat framework.GetRaftAddress
will not found target.So I think the eventDelegate will not get the
e.Node.Meta
, if you don't callmemberlist.UpdateNode
, thee.Node.Meta
will be empty byte array.I'm using dragonboat multi raft framework develop my project, and use gossip configure. And I use memberlist gossip framework sync some business data. When I use memberlist delegate meta, I see your dragonboat codes, and my code is same to you. I found the problem, then I call
memberlist.UpdateNode
first solve it. All cluster machine can received the meta data.