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 afd4bcd  update mutex
afd4bcd is described below

commit afd4bcdb66d329e61fb04e98a0d0c6784a1044c0
Author: mrproliu <[email protected]>
AuthorDate: Sat Dec 28 23:58:48 2024 +0800

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

diff --git a/pkg/process/finders/kubernetes/finder.go 
b/pkg/process/finders/kubernetes/finder.go
index a9043dd..07d93c4 100644
--- a/pkg/process/finders/kubernetes/finder.go
+++ b/pkg/process/finders/kubernetes/finder.go
@@ -84,7 +84,7 @@ type ProcessFinder struct {
 
        // for IsPodIP check
        podIPChecker *cache.Expiring
-       podIPMutexes map[int]sync.Mutex
+       podIPMutexes map[int]*sync.Mutex
 }
 
 func (f *ProcessFinder) Init(ctx context.Context, conf base.FinderBaseConfig, 
manager base.ProcessManager) error {
@@ -102,9 +102,9 @@ func (f *ProcessFinder) Init(ctx context.Context, conf 
base.FinderBaseConfig, ma
        f.registry = NewRegistry(f.CLI, f.namespaces, f.conf.NodeName)
        f.manager = manager
        f.podIPChecker = cache.NewExpiring()
-       f.podIPMutexes = make(map[int]sync.Mutex)
+       f.podIPMutexes = make(map[int]*sync.Mutex)
        for i := range ipSearchParallel {
-               f.podIPMutexes[i] = sync.Mutex{}
+               f.podIPMutexes[i] = &sync.Mutex{}
        }
        processCache, err := lru.New(5000)
        if err != nil {

Reply via email to