You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ha...@apache.org on 2022/04/21 14:55:30 UTC

[skywalking-banyandb] branch patch-path created (now 2ec02e6)

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

hanahmily pushed a change to branch patch-path
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git


      at 2ec02e6  Append group name to the end of tsdb's path

This branch includes the following new commits:

     new 2ec02e6  Append group name to the end of tsdb's path

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[skywalking-banyandb] 01/01: Append group name to the end of tsdb's path

Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hanahmily pushed a commit to branch patch-path
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git

commit 2ec02e672e1ce3e72147ab24d1ee89922b3d4a83
Author: Gao Hongtao <ha...@gmail.com>
AuthorDate: Thu Apr 21 14:54:51 2022 +0000

    Append group name to the end of tsdb's path
    
    Signed-off-by: Gao Hongtao <ha...@gmail.com>
---
 banyand/measure/metadata.go | 3 ++-
 banyand/stream/metadata.go  | 3 ++-
 pkg/schema/metadata.go      | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/banyand/measure/metadata.go b/banyand/measure/metadata.go
index 4858b30..0499083 100644
--- a/banyand/measure/metadata.go
+++ b/banyand/measure/metadata.go
@@ -19,6 +19,7 @@ package measure
 
 import (
 	"context"
+	"path"
 	"time"
 
 	"github.com/apache/skywalking-banyandb/api/common"
@@ -201,7 +202,7 @@ func (s *supplier) OpenDB(groupSchema *commonv1.Group) (tsdb.Database, error) {
 			Database: groupSchema.Metadata.Name,
 		}),
 		tsdb.DatabaseOpts{
-			Location: s.path,
+			Location: path.Join(s.path, groupSchema.Metadata.Name),
 			ShardNum: groupSchema.ResourceOpts.ShardNum,
 			EncodingMethod: tsdb.EncodingMethod{
 				EncoderPool: encoding.NewPlainEncoderPool(chunkSize),
diff --git a/banyand/stream/metadata.go b/banyand/stream/metadata.go
index f1b8f79..bf053a8 100644
--- a/banyand/stream/metadata.go
+++ b/banyand/stream/metadata.go
@@ -19,6 +19,7 @@ package stream
 
 import (
 	"context"
+	"path"
 	"time"
 
 	"github.com/apache/skywalking-banyandb/api/common"
@@ -201,7 +202,7 @@ func (s *supplier) OpenDB(groupSchema *commonv1.Group) (tsdb.Database, error) {
 			Database: groupSchema.Metadata.Name,
 		}),
 		tsdb.DatabaseOpts{
-			Location: s.path,
+			Location: path.Join(s.path, groupSchema.Metadata.Name),
 			ShardNum: groupSchema.ResourceOpts.ShardNum,
 			EncodingMethod: tsdb.EncodingMethod{
 				EncoderPool: encoding.NewPlainEncoderPool(chunkSize),
diff --git a/pkg/schema/metadata.go b/pkg/schema/metadata.go
index 31a69b8..67a87c2 100644
--- a/pkg/schema/metadata.go
+++ b/pkg/schema/metadata.go
@@ -175,7 +175,7 @@ func (sr *schemaRepo) Watcher() {
 					break
 				}
 				time.Sleep(time.Second)
-				sr.l.Err(err).Interface("event", evt).Msg("fail to handle the metadata event. retry...")
+				sr.l.Err(err).Interface("event", evt).Int("round", i).Msg("fail to handle the metadata event. retry...")
 			}
 		case <-sr.workerStopCh:
 			return