mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-24 05:04:05 -08:00
Don't return an error when tracker is closed
If we return an error here it bubbles up to the engine and causes the query to be marked as failed. That's misleading and will cause errors in logs on normal shutdown. It's better to simply do nothing when tracker is closed. Signed-off-by: Lukasz Mierzwa <l.mierzwa@gmail.com>
This commit is contained in:
parent
5642fac9fd
commit
20a47d8016
|
@ -220,7 +220,7 @@ func (tracker ActiveQueryTracker) Delete(insertIndex int) {
|
|||
|
||||
func (tracker ActiveQueryTracker) Insert(ctx context.Context, query string) (int, error) {
|
||||
if !tracker.isRunning.Load() {
|
||||
return 0, errors.New("ActiveQueryTracker is stopped")
|
||||
return 0, nil
|
||||
}
|
||||
select {
|
||||
case i := <-tracker.getNextIndex:
|
||||
|
|
Loading…
Reference in a new issue