* Makes `tailer.droppedStreams` slice bounded.
For slow receiver, this dropped streams may cause ingester memory to keep increasing.
Sometimes OOMing the ingester.
Signed-off-by: Kaviraj <kavirajkanagaraj@gmail.com>
* Make droppedStreams slice size configurable
Update tests
Adding logging when slice is dropped
Signed-off-by: Kaviraj <kavirajkanagaraj@gmail.com>
* Add test for dropped stream
Signed-off-by: Kaviraj <kavirajkanagaraj@gmail.com>
f.DurationVar(&cfg.QueryStoreMaxLookBackPeriod,"ingester.query-store-max-look-back-period",0,"How far back should an ingester be allowed to query the store for data, for use only with boltdb-shipper index and filesystem object store. -1 for infinite.")
f.BoolVar(&cfg.AutoForgetUnhealthy,"ingester.autoforget-unhealthy",false,"Enable to remove unhealthy ingesters from the ring after `ring.kvstore.heartbeat_timeout`")
f.IntVar(&cfg.IndexShards,"ingester.index-shards",index.DefaultIndexShards,"Shard factor used in the ingesters for the in process reverse index. This MUST be evenly divisible by ALL schema shard factors or Loki will not start.")
f.IntVar(&cfg.MaxDroppedStreams,"ingester.tailer.max-dropped-streams",10,"Maximum number of dropped streams to keep in memory during tailing")