Browse Source

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

ngjaying 5 năm trước cách đây
mục cha
commit
4933d3b4d6
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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)