tsdb/chunks: preallocate at least some space on non-Windows systems (#9581)
To avoid potential chunk corruption read, which I am not sure why is happening. Closes #9561. Signed-off-by: Mateusz Gozdek <mgozdekof@gmail.com>
This commit is contained in:
parent
c564984daa
commit
b319b14431
|
@ -17,5 +17,6 @@
|
|||
package chunks
|
||||
|
||||
// HeadChunkFilePreallocationSize is the size to which the m-map file should be preallocated when a new file is cut.
|
||||
// Windows needs pre-allocations while the other OS does not.
|
||||
var HeadChunkFilePreallocationSize int64
|
||||
// Windows needs pre-allocations while the other OS does not. But we observed that a 0 pre-allocation causes unit tests to flake.
|
||||
// This small allocation for non-Windows OSes removes the flake.
|
||||
var HeadChunkFilePreallocationSize int64 = MinWriteBufferSize * 2
|
||||
|
|
Loading…
Reference in New Issue