aboutsummaryrefslogtreecommitdiff
path: root/weed/mq/topic
diff options
context:
space:
mode:
Diffstat (limited to 'weed/mq/topic')
-rw-r--r--weed/mq/topic/local_partition.go2
-rw-r--r--weed/mq/topic/topic.go10
2 files changed, 6 insertions, 6 deletions
diff --git a/weed/mq/topic/local_partition.go b/weed/mq/topic/local_partition.go
index d1433775a..00ea04eee 100644
--- a/weed/mq/topic/local_partition.go
+++ b/weed/mq/topic/local_partition.go
@@ -155,7 +155,7 @@ func (p *LocalPartition) MaybeConnectToFollowers(initMessage *mq_pb.PublishMessa
followerClient := mq_pb.NewSeaweedMessagingClient(p.followerGrpcConnection)
p.publishFolloweMeStream, err = followerClient.PublishFollowMe(ctx)
if err != nil {
- return fmt.Errorf("fail to create publish client: %v", err)
+ return fmt.Errorf("fail to create publish client: %w", err)
}
if err = p.publishFolloweMeStream.Send(&mq_pb.PublishFollowMeRequest{
Message: &mq_pb.PublishFollowMeRequest_Init{
diff --git a/weed/mq/topic/topic.go b/weed/mq/topic/topic.go
index 1e42c3f4d..56b9cda5f 100644
--- a/weed/mq/topic/topic.go
+++ b/weed/mq/topic/topic.go
@@ -52,12 +52,12 @@ func (t Topic) ReadConfFile(client filer_pb.SeaweedFilerClient) (*mq_pb.Configur
return nil, err
}
if err != nil {
- return nil, fmt.Errorf("read topic.conf of %v: %v", t, err)
+ return nil, fmt.Errorf("read topic.conf of %v: %w", t, err)
}
// parse into filer conf object
conf := &mq_pb.ConfigureTopicResponse{}
if err = jsonpb.Unmarshal(data, conf); err != nil {
- return nil, fmt.Errorf("unmarshal topic %v conf: %v", t, err)
+ return nil, fmt.Errorf("unmarshal topic %v conf: %w", t, err)
}
return conf, nil
}
@@ -75,7 +75,7 @@ func (t Topic) ReadConfFileWithMetadata(client filer_pb.SeaweedFilerClient) (*mq
if errors.Is(err, filer_pb.ErrNotFound) {
return nil, 0, 0, err
}
- return nil, 0, 0, fmt.Errorf("lookup topic.conf of %v: %v", t, err)
+ return nil, 0, 0, fmt.Errorf("lookup topic.conf of %v: %w", t, err)
}
// Get file metadata
@@ -88,7 +88,7 @@ func (t Topic) ReadConfFileWithMetadata(client filer_pb.SeaweedFilerClient) (*mq
// Parse the configuration
conf := &mq_pb.ConfigureTopicResponse{}
if err = jsonpb.Unmarshal(resp.Entry.Content, conf); err != nil {
- return nil, 0, 0, fmt.Errorf("unmarshal topic %v conf: %v", t, err)
+ return nil, 0, 0, fmt.Errorf("unmarshal topic %v conf: %w", t, err)
}
return conf, createdAtNs, modifiedAtNs, nil
@@ -98,7 +98,7 @@ func (t Topic) WriteConfFile(client filer_pb.SeaweedFilerClient, conf *mq_pb.Con
var buf bytes.Buffer
filer.ProtoToText(&buf, conf)
if err := filer.SaveInsideFiler(client, t.Dir(), filer.TopicConfFile, buf.Bytes()); err != nil {
- return fmt.Errorf("save topic %v conf: %v", t, err)
+ return fmt.Errorf("save topic %v conf: %w", t, err)
}
return nil
}