retryLoop is a single background goroutine that processes failed batches from retryCh. Each batch is retried up to maxRetries times with a fixed delay between attempts. When draining is set (shutdown), batches get a single immediate write attempt instead. The loop exits when retryCh is closed by the
()
| 457 | // batches get a single immediate write attempt instead. The loop exits |
| 458 | // when retryCh is closed by the run goroutine. |
| 459 | func (b *DBBatcher) retryLoop() { |
| 460 | for params := range b.retryCh { |
| 461 | b.retryBatch(params) |
| 462 | } |
| 463 | } |
| 464 | |
| 465 | // retryBatch retries writing a batch up to maxRetries times with a |
| 466 | // fixed delay between attempts. If the batcher context is canceled |
no test coverage detected