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 2021/05/14 07:10:54 UTC

[skywalking-banyandb] branch main updated: Make banyand executable

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 3726146  Make banyand executable
3726146 is described below

commit 3726146e24743dda23b4056079789ed659e3ba0e
Author: Gao Hongtao <ha...@gmail.com>
AuthorDate: Fri May 14 15:09:44 2021 +0800

    Make banyand executable
    
    Signed-off-by: Gao Hongtao <ha...@gmail.com>
---
 banyand/queue/local.go      | 4 ++--
 banyand/storage/database.go | 5 ++++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/banyand/queue/local.go b/banyand/queue/local.go
index aeabda5..5a88d0a 100644
--- a/banyand/queue/local.go
+++ b/banyand/queue/local.go
@@ -57,11 +57,11 @@ type Local struct {
 }
 
 func (e *Local) Subscribe(topic bus.Topic, listener bus.MessageListener) error {
-	panic("implement me")
+	return nil
 }
 
 func (e *Local) Publish(topic bus.Topic, message ...bus.Message) error {
-	panic("implement me")
+	return nil
 }
 
 func (e *Local) FlagSet() *run.FlagSet {
diff --git a/banyand/storage/database.go b/banyand/storage/database.go
index f42b546..f5b0cb6 100644
--- a/banyand/storage/database.go
+++ b/banyand/storage/database.go
@@ -49,7 +49,7 @@ func (d *DB) Name() string {
 
 func (d *DB) FlagSet() *run.FlagSet {
 	fs := run.NewFlagSet("storage")
-	fs.StringVar(&d.root, "root-path", "", "the root path of database")
+	fs.StringVar(&d.root, "root-path", "/tmp", "the root path of database")
 	fs.IntVar(&d.shards, "shards", 1, "total shards size")
 	return fs
 }
@@ -59,6 +59,9 @@ func (d *DB) Validate() error {
 }
 
 func (d *DB) PreRun() error {
+	if d.repo == nil {
+		return nil
+	}
 	if err := d.init(); err != nil {
 		return fmt.Errorf("failed to initialize db: %v", err)
 	}