Read datanode insertbuf from env (#8942)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/8971/head
congqixia 2021-09-30 17:45:07 +08:00 committed by GitHub
parent 10a6f7f146
commit 6bbf0a8f8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 1 deletions

View File

@ -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() {

View File

@ -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) {