mirror of https://github.com/milvus-io/milvus.git
Add root path in minio and replace etcd.rootPath in datanode (#8272)
issue: #7905 Signed-off-by: sunby <bingyi.sun@zilliz.com>pull/8491/head
parent
12fb8290b9
commit
816bac82ec
|
@ -29,6 +29,7 @@ minio:
|
|||
secretAccessKey: minioadmin
|
||||
useSSL: false
|
||||
bucketName: "a-bucket"
|
||||
rootPath: files
|
||||
|
||||
pulsar:
|
||||
address: localhost
|
||||
|
|
|
@ -143,7 +143,7 @@ func (p *ParamTable) initFlushInsertBufferSize() {
|
|||
|
||||
func (p *ParamTable) initInsertBinlogRootPath() {
|
||||
// GOOSE TODO: rootPath change to TenentID
|
||||
rootPath, err := p.Load("etcd.rootPath")
|
||||
rootPath, err := p.Load("minio.rootPath")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ func (p *ParamTable) initInsertBinlogRootPath() {
|
|||
}
|
||||
|
||||
func (p *ParamTable) initStatsBinlogRootPath() {
|
||||
rootPath, err := p.Load("etcd.rootPath")
|
||||
rootPath, err := p.Load("minio.rootPath")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ package datanode
|
|||
|
||||
import (
|
||||
"log"
|
||||
"path"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
|
@ -122,4 +123,15 @@ func TestParamTable(t *testing.T) {
|
|||
Params.UpdatedTime = time.Now()
|
||||
log.Println("UpdatedTime: ", Params.UpdatedTime)
|
||||
})
|
||||
|
||||
t.Run("Test InsertBinlogRootPath", func(t *testing.T) {
|
||||
Params.Init()
|
||||
assert.Equal(t, path.Join("files", "insert_log"), Params.InsertBinlogRootPath)
|
||||
})
|
||||
|
||||
t.Run("Test StatsBinlogRootPath", func(t *testing.T) {
|
||||
p := new(ParamTable)
|
||||
p.Init()
|
||||
assert.Equal(t, path.Join("files", "stats_log"), Params.StatsBinlogRootPath)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue