We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
lastError
flush()
1 parent 1d85e8e commit d22ca40Copy full SHA for d22ca40
1 file changed
internal/sinks/postgres.go
@@ -422,7 +422,10 @@ func (pgw *PostgresWriter) flush(msgs []metrics.MeasurementEnvelope) {
422
}
423
pgw.forceRecreatePartitions = false
424
if err != nil {
425
- pgw.lastError <- err
+ select {
426
+ case pgw.lastError <- err:
427
+ default:
428
+ }
429
430
431
var rowsBatched, n int64
@@ -446,7 +449,10 @@ func (pgw *PostgresWriter) flush(msgs []metrics.MeasurementEnvelope) {
446
449
logger.WithField("rows", rowsBatched).WithField("elapsed", diff).Info("measurements written")
447
450
return
448
451
452
453
454
455
456
457
458
func (pgw *PostgresWriter) EnsureMetricTimescale(pgPartBounds map[string]ExistingPartitionInfo) (err error) {
0 commit comments