浏览代码

feat(stream): reduce default cache length to 1024 to avoid large memory footprint

ngjaying 5 年之前
父节点
当前提交
4933d3b4d6
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      xstream/nodes/sink_node.go

+ 1 - 1
xstream/nodes/sink_node.go

@@ -86,7 +86,7 @@ func (m *SinkNode) Open(ctx api.StreamContext, result chan<- error) {
 				retryInterval = t
 			}
 		}
-		cacheLength := 10240
+		cacheLength := 1024
 		if c, ok := m.options["cacheLength"]; ok {
 			if t, err := common.ToInt(c); err != nil || t < 0 {
 				logger.Warnf("invalid type for cacheLength property, should be positive integer but found %t", c)