Update WAL comments

[ci skip]
pull/4072/head
Philip O'Toole 2015-09-10 11:29:43 -07:00
parent 101a4d2a55
commit 5086ea42fa
1 changed files with 2 additions and 2 deletions

View File

@ -59,7 +59,7 @@ const (
// FailWriteMemoryThreshold will start returning errors on writes if the memory gets more
// than this multiple above the maximum threshold. This is set to 5 because previously
// the memory threshold was for 5 partitions, but when this was introduce the partition
// the memory threshold was for 5 partitions, but when this was introduced the partition
// count was reduced to 1 so we know that it can handle at least this much extra memory
FailWriteMemoryThreshold = 5
@ -767,7 +767,7 @@ func (p *Partition) Write(points []tsdb.Point) error {
if shouldFailWrite, shouldCompact := func() (shouldFailWrite bool, shouldCompact bool) {
p.mu.RLock()
defer p.mu.RUnlock()
// pause writes for a bit if we've hit the size threshold
// Return an error if memory threshold has been reached.
if p.memorySize > p.sizeThreshold {
if !p.compactionRunning {
shouldCompact = true