Enhancement
We introduced the new ID-generated algorithm in #276, but as code below:
func (sf *snowflake) RegisterNode(ctx context.Context, in *wrapperspb.UInt32Value) (*emptypb.Empty, error) {
...
id := uint16(in.Value)
_, exist := sf.nodes[id]
if exist {
return nil, errors.New("node has been register")
}
...
So If a node exit unexpectedly and does not unregister itself, the new one will not be able to register again, how to fix it?