This is an automated email from the ASF dual-hosted git repository.

liuhan pushed a commit to branch reduce-handle-connect-time
in repository https://gitbox.apache.org/repos/asf/skywalking-rover.git


The following commit(s) were added to refs/heads/reduce-handle-connect-time by 
this push:
     new 1705ed8  update mutex
1705ed8 is described below

commit 1705ed82d5a6e65bce6bdd516d3a94511e19c752
Author: mrproliu <[email protected]>
AuthorDate: Sun Dec 29 00:09:42 2024 +0800

    update mutex
---
 pkg/process/finders/kubernetes/finder.go | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/pkg/process/finders/kubernetes/finder.go 
b/pkg/process/finders/kubernetes/finder.go
index 07d93c4..0444c82 100644
--- a/pkg/process/finders/kubernetes/finder.go
+++ b/pkg/process/finders/kubernetes/finder.go
@@ -431,6 +431,7 @@ func (f *ProcessFinder) IsPodIP(ip string) (bool, error) {
        mutex := f.podIPMutexes[sum32%ipSearchParallel]
        mutex.Lock()
        defer mutex.Unlock()
+       log.Infof("searching pod ip: %s", ip)
 
        pods, err := f.CLI.CoreV1().Pods(v1.NamespaceAll).List(f.ctx, 
metav1.ListOptions{
                FieldSelector: fields.OneTermEqualSelector("status.podIP", 
ip).String(),
@@ -444,5 +445,6 @@ func (f *ProcessFinder) IsPodIP(ip string) (bool, error) {
        // the timeout added a random value to avoid the cache avalanche
        addedTime := time.Millisecond * time.Duration(rand.IntnRange(1000, 
10000))
        f.podIPChecker.Set(ip, found, ipExistTimeout+addedTime)
+       log.Infof("found pod ip: %s, %v", ip, found)
        return found, nil
 }

Reply via email to