Add deploy mode env variable

Signed-off-by: cai.zhang <cai.zhang@zilliz.com>
This commit is contained in:
cai.zhang 2021-03-27 11:56:57 +08:00 committed by yefu.chen
parent 5ccf0c3d70
commit c4a58d259a
3 changed files with 4 additions and 1 deletions

View File

@ -16,6 +16,7 @@ import (
) )
func main() { func main() {
os.Setenv("DEPLOY_MODE", "DISTRIBUTED")
ctx, cancel := context.WithCancel(context.Background()) ctx, cancel := context.WithCancel(context.Background())
msFactory := pulsarms.NewFactory() msFactory := pulsarms.NewFactory()
proxynode.Params.Init() proxynode.Params.Init()

View File

@ -42,6 +42,7 @@ func main() {
var roles roles.MilvusRoles var roles roles.MilvusRoles
initRoles(&roles) initRoles(&roles)
os.Setenv("QUERY_NODE_ID", "1") os.Setenv("QUERY_NODE_ID", "1")
os.Setenv("DEPLOY_MODE", "SINGLE_NODE")
logCfg := initLogCfg() logCfg := initLogCfg()
logutil.SetupLogger(&logCfg) logutil.SetupLogger(&logCfg)

View File

@ -3,6 +3,7 @@ package proxynode
import ( import (
"context" "context"
"errors" "errors"
"os"
"strconv" "strconv"
"go.uber.org/zap" "go.uber.org/zap"
@ -1281,7 +1282,7 @@ func (node *ProxyNode) RegisterLink(ctx context.Context, req *milvuspb.RegisterL
Address: nil, Address: nil,
Status: &commonpb.Status{ Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_Success, ErrorCode: commonpb.ErrorCode_Success,
Reason: "", Reason: os.Getenv("DEPLOY_MODE"),
}, },
}, nil }, nil
} }