ptw.w can be accessed here because this is called with the lock ptw.mutex already held.
()
| 1064 | |
| 1065 | // ptw.w can be accessed here because this is called with the lock ptw.mutex already held. |
| 1066 | func (ptw *partitionWriter) newWriteBatch() *writeBatch { |
| 1067 | batch := newWriteBatch(time.Now(), ptw.w.batchTimeout()) |
| 1068 | ptw.w.spawn(func() { ptw.awaitBatch(batch) }) |
| 1069 | return batch |
| 1070 | } |
| 1071 | |
| 1072 | // awaitBatch waits for a batch to either fill up or time out. |
| 1073 | // If the batch is full it only stops the timer, if the timer |
no test coverage detected