Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pkg/server/backend_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,10 @@ func containIDType(idTypes []header.IdentifierType, idType header.IdentifierType
// addBackend adds a backend.
func (s *DefaultBackendStorage) addBackend(identifier string, idType header.IdentifierType, backend *Backend) {
if !containIDType(s.idTypes, idType) {
klog.V(4).InfoS("fail to add backend", "backend", identifier, "error", &ErrWrongIDType{idType, s.idTypes})
klog.V(3).InfoS("fail to add backend", "backend", identifier, "error", &ErrWrongIDType{idType, s.idTypes})
return
}
klog.V(5).InfoS("Register backend for agent", "agentID", identifier)
klog.V(2).InfoS("Register backend for agent", "agentID", identifier)
s.mu.Lock()
defer s.mu.Unlock()
_, ok := s.backends[identifier]
Expand All @@ -273,7 +273,7 @@ func (s *DefaultBackendStorage) removeBackend(identifier string, idType header.I
klog.ErrorS(&ErrWrongIDType{idType, s.idTypes}, "fail to remove backend")
return
}
klog.V(5).InfoS("Remove connection for agent", "agentID", identifier)
klog.V(2).InfoS("Remove connection for agent", "agentID", identifier)
s.mu.Lock()
defer s.mu.Unlock()
backends, ok := s.backends[identifier]
Expand Down Expand Up @@ -347,7 +347,7 @@ func (s *DefaultBackendStorage) GetRandomBackend() (*Backend, error) {
return nil, &ErrNotFound{}
}
agentID := s.agentIDs[s.random.Intn(len(s.agentIDs))]
klog.V(5).InfoS("Pick agent as backend", "agentID", agentID)
klog.V(3).InfoS("Pick agent as backend", "agentID", agentID)
// always return the first connection to an agent, because the agent
// will close later connections if there are multiple.
return s.backends[agentID][0], nil
Expand Down
4 changes: 2 additions & 2 deletions pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ func (s *ProxyServer) Connect(stream agent.AgentService_ConnectServer) error {
}
agentID := backend.GetAgentID()

klog.V(5).InfoS("Connect request from agent", "agentID", agentID, "serverID", s.serverID)
klog.V(2).InfoS("Connect request from agent", "agentID", agentID, "serverID", s.serverID)
labels := runpprof.Labels(
"serverCount", strconv.Itoa(s.serverCount),
"agentID", agentID,
Expand Down Expand Up @@ -946,7 +946,7 @@ func (s *ProxyServer) serveRecvBackend(backend *Backend, agentID string, recvCh
klog.V(5).InfoS("Ignoring unrecognized packet from backend", "packet", pkt, "agentID", agentID)
}
}
klog.V(5).InfoS("Close backend of agent", "agentID", agentID)
klog.V(3).InfoS("Close backend of agent", "agentID", agentID)
}

func (s *ProxyServer) sendBackendClose(backend *Backend, connectID int64, random int64, reason string) {
Expand Down