This is an automated email from the ASF dual-hosted git repository.
hanahmily pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git
The following commit(s) were added to refs/heads/main by this push:
new 833bf42a build(fodc): add the banyandb prefix to IMG_NAME (#926)
833bf42a is described below
commit 833bf42a09168869009aeac189ebf28bf457e08f
Author: Fine0830 <[email protected]>
AuthorDate: Wed Jan 7 12:21:28 2026 +0800
build(fodc): add the banyandb prefix to IMG_NAME (#926)
* update img name
---------
Co-authored-by: 吴晟 Wu Sheng <[email protected]>
---
fodc/agent/Makefile | 2 +-
fodc/agent/internal/proxy/client.go | 21 ++++++++++++++++++---
fodc/proxy/Makefile | 2 +-
3 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/fodc/agent/Makefile b/fodc/agent/Makefile
index 1ba17ccb..8a5672a2 100644
--- a/fodc/agent/Makefile
+++ b/fodc/agent/Makefile
@@ -19,7 +19,7 @@
NAME := fodc
BINARIES := $(NAME)-agent
-IMG_NAME := skywalking-fodc-agent
+IMG_NAME := skywalking-banyandb-fodc-agent
# Override SOURCE_DIR to match the actual Go module path structure
SOURCE_DIR := fodc/agent
diff --git a/fodc/agent/internal/proxy/client.go
b/fodc/agent/internal/proxy/client.go
index 3801abec..7ca4ee0e 100644
--- a/fodc/agent/internal/proxy/client.go
+++ b/fodc/agent/internal/proxy/client.go
@@ -493,11 +493,15 @@ func (c *Client) Disconnect() error {
func (c *Client) Start(ctx context.Context) error {
c.connManager.start(ctx)
+ c.streamsMu.RLock()
+ stopCh := c.stopCh
+ c.streamsMu.RUnlock()
+
for {
select {
case <-ctx.Done():
return ctx.Err()
- case <-c.stopCh:
+ case <-stopCh:
return nil
default:
}
@@ -533,11 +537,15 @@ func (c *Client) Start(ctx context.Context) error {
// handleRegistrationStream handles the registration stream.
func (c *Client) handleRegistrationStream(ctx context.Context, stream
fodcv1.FODCService_RegisterAgentClient) {
+ c.streamsMu.RLock()
+ stopCh := c.stopCh
+ c.streamsMu.RUnlock()
+
for {
select {
case <-ctx.Done():
return
- case <-c.stopCh:
+ case <-stopCh:
return
default:
}
@@ -565,11 +573,15 @@ func (c *Client) handleRegistrationStream(ctx
context.Context, stream fodcv1.FOD
// handleMetricsStream handles the metrics stream.
func (c *Client) handleMetricsStream(ctx context.Context, stream
fodcv1.FODCService_StreamMetricsClient) {
+ c.streamsMu.RLock()
+ stopCh := c.stopCh
+ c.streamsMu.RUnlock()
+
for {
select {
case <-ctx.Done():
return
- case <-c.stopCh:
+ case <-stopCh:
return
default:
}
@@ -645,6 +657,9 @@ func (c *Client) reconnect(ctx context.Context) {
c.heartbeatWg.Wait()
c.streamsMu.Lock()
+ if !c.disconnected {
+ close(c.stopCh)
+ }
c.stopCh = make(chan struct{})
if c.registrationStream != nil {
_ = c.registrationStream.CloseSend()
diff --git a/fodc/proxy/Makefile b/fodc/proxy/Makefile
index 709b8edd..23b9b3e7 100644
--- a/fodc/proxy/Makefile
+++ b/fodc/proxy/Makefile
@@ -19,7 +19,7 @@
NAME := fodc
BINARIES := $(NAME)-proxy
-IMG_NAME := skywalking-fodc-proxy
+IMG_NAME := skywalking-banyandb-fodc-proxy
# Override SOURCE_DIR to match the actual Go module path structure
SOURCE_DIR := fodc/proxy