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() {
os.Setenv("DEPLOY_MODE", "DISTRIBUTED")
ctx, cancel := context.WithCancel(context.Background())
msFactory := pulsarms.NewFactory()
proxynode.Params.Init()

View File

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

View File

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