MCPcopy Index your code
hub / github.com/prometheus/prometheus / processJob

Method processJob

tsdb/chunks/chunk_write_queue.go:130–144  ·  view source on GitHub ↗
(job chunkWriteJob)

Source from the content-addressed store, hash-verified

128}
129
130func (c *chunkWriteQueue) processJob(job chunkWriteJob) {
131 err := c.writeChunk(job.seriesRef, job.mint, job.maxt, job.chk, job.ref, job.isOOO, job.cutFile)
132 if job.callback != nil {
133 job.callback(err)
134 }
135
136 c.chunkRefMapMtx.Lock()
137 defer c.chunkRefMapMtx.Unlock()
138
139 delete(c.chunkRefMap, job.ref)
140
141 c.completed.Inc()
142
143 c.shrinkChunkRefMap()
144}
145
146// shrinkChunkRefMap checks whether the conditions to shrink the chunkRefMap are met,
147// if so chunkRefMap is reinitialized. The chunkRefMapMtx must be held when calling this method.

Callers 1

startMethod · 0.95

Calls 4

shrinkChunkRefMapMethod · 0.95
writeChunkMethod · 0.80
LockMethod · 0.80
IncMethod · 0.80

Tested by

no test coverage detected