mirror of https://github.com/milvus-io/milvus.git
Read datanode insertbuf from env (#8942)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>pull/8971/head
parent
10a6f7f146
commit
6bbf0a8f8f
|
@ -142,7 +142,7 @@ func (p *ParamTable) initFlowGraphMaxParallelism() {
|
|||
|
||||
// ---- flush configs ----
|
||||
func (p *ParamTable) initFlushInsertBufferSize() {
|
||||
p.FlushInsertBufferSize = p.ParseInt64("datanode.flush.insertBufSize")
|
||||
p.FlushInsertBufferSize = p.ParseInt64("_DATANODE_INSERTBUFSIZE")
|
||||
}
|
||||
|
||||
func (p *ParamTable) initInsertBinlogRootPath() {
|
||||
|
|
|
@ -238,6 +238,22 @@ func (gp *BaseTable) tryloadFromEnv() {
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
insertBufferFlushSize := os.Getenv("DATA_NODE_IBUFSIZE")
|
||||
if insertBufferFlushSize == "" {
|
||||
//var err error
|
||||
insertBufferFlushSize, err = gp.Load("datanode.flush.insertBufSize")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
if insertBufferFlushSize == "" {
|
||||
insertBufferFlushSize = "16777216" //use default
|
||||
}
|
||||
err = gp.Save("_DATANODE_INSERTBUFSIZE", insertBufferFlushSize)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
func (gp *BaseTable) Load(key string) (string, error) {
|
||||
|
|
Loading…
Reference in New Issue