mirror of https://github.com/milvus-io/milvus.git
fix: fix wrong log file name when running as mixture type (#29979)
See also: #25323, #29969 many users reported log file name is incorrect when starting in mixture type. --------- Signed-off-by: sunby <sunbingyi1992@gmail.com>pull/30153/head
parent
86f48861c1
commit
dad27cbb40
|
@ -13,10 +13,15 @@ import (
|
|||
"github.com/milvus-io/milvus/pkg/log"
|
||||
"github.com/milvus-io/milvus/pkg/util/hardware"
|
||||
"github.com/milvus-io/milvus/pkg/util/metricsinfo"
|
||||
"github.com/milvus-io/milvus/pkg/util/paramtable"
|
||||
)
|
||||
|
||||
type run struct{}
|
||||
|
||||
func init() {
|
||||
paramtable.Init()
|
||||
}
|
||||
|
||||
func (c *run) execute(args []string, flags *flag.FlagSet) {
|
||||
if len(args) < 3 {
|
||||
fmt.Fprintln(os.Stderr, getHelp())
|
||||
|
|
|
@ -24,6 +24,7 @@ import (
|
|||
"github.com/milvus-io/milvus/pkg/log"
|
||||
"github.com/milvus-io/milvus/pkg/util/etcd"
|
||||
"github.com/milvus-io/milvus/pkg/util/hardware"
|
||||
"github.com/milvus-io/milvus/pkg/util/paramtable"
|
||||
"github.com/milvus-io/milvus/pkg/util/typeutil"
|
||||
)
|
||||
|
||||
|
@ -171,6 +172,7 @@ func GetMilvusRoles(args []string, flags *flag.FlagSet) *roles.MilvusRoles {
|
|||
os.Exit(-1)
|
||||
}
|
||||
|
||||
paramtable.SetRole(serverType)
|
||||
return role
|
||||
}
|
||||
|
||||
|
|
|
@ -103,11 +103,6 @@ func runComponent[T component](ctx context.Context,
|
|||
factory := dependency.NewFactory(localMsg)
|
||||
var err error
|
||||
role, err = creator(ctx, factory)
|
||||
if localMsg {
|
||||
paramtable.SetRole(typeutil.StandaloneRole)
|
||||
} else {
|
||||
paramtable.SetRole(role.GetName())
|
||||
}
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue