Rename peer cluster cache
This commit is contained in:
parent
948af0a12b
commit
3d7db4248f
|
@ -319,7 +319,7 @@ type Core struct {
|
|||
// Lock for the cluster leader values
|
||||
clusterLeaderParamsLock sync.RWMutex
|
||||
// Info on cluster members
|
||||
peerClusterAddrsCache *cache.Cache
|
||||
clusterPeerClusterAddrsCache *cache.Cache
|
||||
// The grpc Server that handles server RPC calls
|
||||
rpcServer *grpc.Server
|
||||
// The context for the client
|
||||
|
@ -447,7 +447,7 @@ func NewCore(conf *CoreConfig) (*Core, error) {
|
|||
clusterName: conf.ClusterName,
|
||||
clusterListenerShutdownCh: make(chan struct{}),
|
||||
clusterListenerShutdownSuccessCh: make(chan struct{}),
|
||||
peerClusterAddrsCache: cache.New(3*heartbeatInterval, time.Second),
|
||||
clusterPeerClusterAddrsCache: cache.New(3*heartbeatInterval, time.Second),
|
||||
enableMlock: !conf.DisableMlock,
|
||||
}
|
||||
|
||||
|
|
|
@ -364,7 +364,7 @@ func (s *forwardedRequestRPCServer) ForwardRequest(ctx context.Context, freq *fo
|
|||
|
||||
func (s *forwardedRequestRPCServer) Echo(ctx context.Context, in *EchoRequest) (*EchoReply, error) {
|
||||
if in.ClusterAddr != "" {
|
||||
s.core.peerClusterAddrsCache.Set(in.ClusterAddr, nil, 0)
|
||||
s.core.clusterPeerClusterAddrsCache.Set(in.ClusterAddr, nil, 0)
|
||||
}
|
||||
return &EchoReply{
|
||||
Message: "pong",
|
||||
|
|
Loading…
Reference in New Issue