This is an automated email from the ASF dual-hosted git repository.
wankai 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 a3fc5bc1 Fix the bug of node selector in newLiaisonCmd (#798)
a3fc5bc1 is described below
commit a3fc5bc16e8c9c3385beb41dcef8b988314ff58d
Author: Gao Hongtao <[email protected]>
AuthorDate: Tue Sep 30 13:48:09 2025 +0800
Fix the bug of node selector in newLiaisonCmd (#798)
It doesn't include traceDataNodeSel.
---
banyand/internal/sidx/part_wrapper.go | 1 -
banyand/internal/sidx/snapshot.go | 3 ---
pkg/cmdsetup/liaison.go | 2 +-
test/stress/stream-vs-trace/data_generator.go | 2 +-
test/stress/stream-vs-trace/stream_client.go | 2 +-
5 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/banyand/internal/sidx/part_wrapper.go
b/banyand/internal/sidx/part_wrapper.go
index 37199f07..cd589f99 100644
--- a/banyand/internal/sidx/part_wrapper.go
+++ b/banyand/internal/sidx/part_wrapper.go
@@ -56,7 +56,6 @@ func (s partWrapperState) String() string {
type partWrapper struct {
p *part
mp *memPart
- snapshot []uint64
ref int32
state int32
removable atomic.Bool
diff --git a/banyand/internal/sidx/snapshot.go
b/banyand/internal/sidx/snapshot.go
index 5fdbf51e..e99182d6 100644
--- a/banyand/internal/sidx/snapshot.go
+++ b/banyand/internal/sidx/snapshot.go
@@ -277,7 +277,6 @@ func (s *snapshot) copyAllTo(epoch uint64) *snapshot {
for _, pw := range result.parts {
if pw != nil {
pw.acquire()
- pw.snapshot = append(pw.snapshot, epoch)
}
}
@@ -292,12 +291,10 @@ func (s *snapshot) merge(nextEpoch uint64, nextParts
map[uint64]*partWrapper) *s
for i := 0; i < len(s.parts); i++ {
if n, ok := nextParts[s.parts[i].ID()]; ok {
result.parts = append(result.parts, n)
- n.snapshot = append(n.snapshot, nextEpoch)
continue
}
if s.parts[i].acquire() {
result.parts = append(result.parts, s.parts[i])
- s.parts[i].snapshot = append(s.parts[i].snapshot,
nextEpoch)
}
}
return &result
diff --git a/pkg/cmdsetup/liaison.go b/pkg/cmdsetup/liaison.go
index f08cce67..95fa88df 100644
--- a/pkg/cmdsetup/liaison.go
+++ b/pkg/cmdsetup/liaison.go
@@ -135,7 +135,7 @@ func newLiaisonCmd(runners ...run.Unit) *cobra.Command {
if err != nil {
return err
}
- for _, sel := range
[]node.Selector{measureDataNodeSel, streamDataNodeSel, propertyNodeSel} {
+ for _, sel := range
[]node.Selector{measureDataNodeSel, streamDataNodeSel, propertyNodeSel,
traceDataNodeSel} {
sel.SetNodeSelector(ls)
}
}
diff --git a/test/stress/stream-vs-trace/data_generator.go
b/test/stress/stream-vs-trace/data_generator.go
index 6a39cd86..be0487fb 100644
--- a/test/stress/stream-vs-trace/data_generator.go
+++ b/test/stress/stream-vs-trace/data_generator.go
@@ -726,7 +726,7 @@ func (s *SpanData) ToTraceWriteRequest()
*tracev1.WriteRequest {
// WriteStreamData writes span data to the stream service.
func (c *StreamClient) WriteStreamData(ctx context.Context, spans []*SpanData)
error {
- stream, err := c.Write(ctx, nil)
+ stream, err := c.Write(ctx)
if err != nil {
return fmt.Errorf("failed to create stream write client: %w",
err)
}
diff --git a/test/stress/stream-vs-trace/stream_client.go
b/test/stress/stream-vs-trace/stream_client.go
index ac3d99aa..3b471829 100644
--- a/test/stress/stream-vs-trace/stream_client.go
+++ b/test/stress/stream-vs-trace/stream_client.go
@@ -70,7 +70,7 @@ func (c *StreamClient) VerifySchema(ctx context.Context,
group, name string) (bo
return true, nil
}
-func (c *StreamClient) Write(ctx context.Context, _ *streamv1.WriteRequest)
(streamv1.StreamService_WriteClient, error) {
+func (c *StreamClient) Write(ctx context.Context)
(streamv1.StreamService_WriteClient, error) {
return c.serviceClient.Write(ctx)
}