(job chunkWriteJob)
| 128 | } |
| 129 | |
| 130 | func (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. |
no test coverage detected