Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix comments. #248

Merged
merged 1 commit into from Jun 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions tsdb/chunks/chunk_write_queue.go
Expand Up @@ -249,7 +249,7 @@ func (c *chunkWriteQueue) queueIsEmpty() bool {
}

func (c *chunkWriteQueue) queueIsFull() bool {
// When the queue is full and blocked on the writer the chunkRefMap has one more job than the cap of the jobCh
// When the queue is full and blocked on the writer the chunkRefMap has one more job than the capacity of the queue
// because one job is currently being processed and blocked in the writer.
return c.queueSize() == c.jobs.maxSize+1
}
Expand All @@ -258,7 +258,7 @@ func (c *chunkWriteQueue) queueSize() int {
c.chunkRefMapMtx.Lock()
defer c.chunkRefMapMtx.Unlock()

// Looking at chunkRefMap instead of jobCh because the job is popped from the chan before it has
// been fully processed, it remains in the chunkRefMap until the processing is complete.
// Looking at chunkRefMap instead of jobs queue because the job is popped from the queue before it has
// been fully processed, but it remains in the chunkRefMap until the processing is complete.
return len(c.chunkRefMap)
}