fixes tmpBlockFile remove on prometheus search error (#109)

This commit is contained in:
Nikolay 2021-01-13 12:53:11 +03:00 committed by GitHub
parent d72fc60108
commit 4cf7a55808
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1005,6 +1005,7 @@ func ProcessSearchQuery(sq *storage.SearchQuery, fetchData bool, deadline search
pd.timestamps = append(pd.timestamps, timestamps...)
})
if err != nil {
putTmpBlocksFile(tbf)
putStorageSearch(sr)
return nil, fmt.Errorf("error when searching in Prometheus data: %w", err)
}