celestiaorg / go-header

Go library with all the services needed to request, sync and store blockchain headers.
Apache License 2.0
19 stars 16 forks source link

store: add retries to `flushLoop` #209

Closed cristaloleg closed 3 months ago

cristaloleg commented 4 months ago

Currently Store[H].flushLoop will not retry a failed batch, will only increase metric and log the error. Backoff with retries should be much better in this case.

Also, should we do log.Fatal/os.Exit when retries is still unsuccessful?

Based on comment https://github.com/celestiaorg/go-header/pull/207#discussion_r1657287028