mirror of https://github.com/grafana/loki
Reverts flush buffer pooling. (#3210)
Currently this requires more work, as the cache is asynchronously using the buffer when flushing chunks. We still benefits from other improvements like computing the right size for a chunk. Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>pull/3217/head
parent
ba0df61531
commit
e74eb549ba
@ -0,0 +1,17 @@ |
||||
package pool |
||||
|
||||
import ( |
||||
"testing" |
||||
|
||||
"github.com/stretchr/testify/require" |
||||
) |
||||
|
||||
func Test_ZeroBuffer(t *testing.T) { |
||||
p := NewBuffer(2, 10, 2) |
||||
require.Equal(t, 0, p.Get(1).Len()) |
||||
require.Equal(t, 0, p.Get(1).Len()) |
||||
require.Equal(t, 0, p.Get(2).Len()) |
||||
require.Equal(t, 0, p.Get(2).Len()) |
||||
require.Equal(t, 0, p.Get(20).Len()) |
||||
require.Equal(t, 0, p.Get(20).Len()) |
||||
} |
||||
Loading…
Reference in new issue