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

mrproliu pushed a commit to branch feat/fodc-pressure-pprof-banyand
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git


The following commit(s) were added to 
refs/heads/feat/fodc-pressure-pprof-banyand by this push:
     new 0fb87e5ac fix comments
0fb87e5ac is described below

commit 0fb87e5ac463df7413ab882a651ab6a7756e83c5
Author: mrproliu <[email protected]>
AuthorDate: Wed Jul 1 08:42:01 2026 +0800

    fix comments
---
 fodc/agent/internal/watchdog/watchdog.go           |  3 +-
 fodc/proxy/internal/grpc/service.go                | 17 +++++--
 test/e2e-v2/cases/fodc-pressure/e2e-mac.yaml       | 58 ----------------------
 .../fodc-pressure/expected/pressure-status.yml     | 15 ++++++
 4 files changed, 29 insertions(+), 64 deletions(-)

diff --git a/fodc/agent/internal/watchdog/watchdog.go 
b/fodc/agent/internal/watchdog/watchdog.go
index 5b5d921a7..bbb0bdafc 100644
--- a/fodc/agent/internal/watchdog/watchdog.go
+++ b/fodc/agent/internal/watchdog/watchdog.go
@@ -331,7 +331,8 @@ func (w *Watchdog) pollAndForward(ctx context.Context) 
(context.Context, error)
        })
 
        w.mu.RLock()
-       hooks := w.postPollHooks
+       hooks := make([]func(context.Context), len(w.postPollHooks))
+       copy(hooks, w.postPollHooks)
        w.mu.RUnlock()
        for _, hook := range hooks {
                hook(ctx)
diff --git a/fodc/proxy/internal/grpc/service.go 
b/fodc/proxy/internal/grpc/service.go
index 1af3f320d..d6d53989b 100644
--- a/fodc/proxy/internal/grpc/service.go
+++ b/fodc/proxy/internal/grpc/service.go
@@ -1022,14 +1022,21 @@ func (s *FODCService) CollectList(agentIDs []string) 
<-chan struct{} {
        s.listMu.Lock()
        s.listWaiters[requestID] = waiter
        s.listMu.Unlock()
-       // Bound the registry entry's lifetime and guarantee the waiter 
unblocks even if some agent
-       // never acks, regardless of whether collectListTTL stays above the 
aggregator's timeout.
-       time.AfterFunc(collectListTTL, func() {
+       // Remove the registry entry as soon as the waiter completes (all 
agents acked), and fall
+       // back to collectListTTL to force-unblock and clean up if some agent 
never acks. This keeps
+       // waiters/timers from lingering the full TTL under frequent list calls.
+       timer := time.NewTimer(collectListTTL)
+       go func() {
+               select {
+               case <-waiter.done:
+                       timer.Stop()
+               case <-timer.C:
+                       waiter.forceDone()
+               }
                s.listMu.Lock()
                delete(s.listWaiters, requestID)
                s.listMu.Unlock()
-               waiter.forceDone()
-       })
+       }()
 
        for _, id := range agentIDs {
                s.connectionsMu.RLock()
diff --git a/test/e2e-v2/cases/fodc-pressure/e2e-mac.yaml 
b/test/e2e-v2/cases/fodc-pressure/e2e-mac.yaml
deleted file mode 100644
index 8bec7d7a7..000000000
--- a/test/e2e-v2/cases/fodc-pressure/e2e-mac.yaml
+++ /dev/null
@@ -1,58 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# LOCAL macOS-ADAPTED copy of e2e.yaml. Identical scenario, but drops the 
CI-only
-# tool-install setup steps (install kubectl / install yq / set PATH) because 
those
-# scripts download Linux binaries that cannot execute on macOS. The local 
machine
-# already has darwin kubectl/python3/curl/go on PATH. Do NOT commit this file.
-
-setup:
-  env: kind
-  file: ../fodc/kind.yaml
-  timeout: 20m
-  init-system-environment: ../../script/env
-  kind:
-    import-images:
-      - apache/skywalking-banyandb:latest
-      - apache/skywalking-banyandb-fodc-agent:latest
-      - apache/skywalking-banyandb-fodc-proxy:latest
-    expose-ports:
-      - namespace: default
-        resource: service/fodc-proxy
-        port: 17913
-  steps:
-    - name: Deploy FODC proxy
-      command: kubectl apply -f test/e2e-v2/cases/fodc/fodc-proxy.yaml
-    - name: Deploy standalone BanyanDB with FODC agent sidecar
-      command: kubectl apply -f 
test/e2e-v2/cases/fodc-pressure/banyandb-cluster.yaml
-    - name: Wait for all workloads to be ready
-      command: |
-        kubectl rollout status deployment/fodc-proxy --timeout=180s
-        kubectl rollout status deployment/banyandb-standalone --timeout=300s
-  wait:
-    - namespace: default
-      resource: deployment/fodc-proxy
-      for: condition=available
-    - namespace: default
-      resource: deployment/banyandb-standalone
-      for: condition=available
-
-verify:
-  retry:
-    count: 20
-    interval: 10s
-  cases:
-    - query: bash test/e2e-v2/cases/fodc-pressure/check-pressure.sh
-      expected: expected/pressure-status.yml
diff --git a/test/e2e-v2/cases/fodc-pressure/expected/pressure-status.yml 
b/test/e2e-v2/cases/fodc-pressure/expected/pressure-status.yml
index ced2fcd51..4ee44bd2b 100644
--- a/test/e2e-v2/cases/fodc-pressure/expected/pressure-status.yml
+++ b/test/e2e-v2/cases/fodc-pressure/expected/pressure-status.yml
@@ -1 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 status: passed

Reply via email to