lib/storage: properly cache tagFilters -> TSIDs entries from historical index

This commit is contained in:
Aliaksandr Valialkin 2019-08-14 02:12:42 +03:00
parent 964c296f96
commit 5b41122292

View File

@ -991,7 +991,8 @@ func (db *indexDB) searchTSIDs(tfss []*TagFilters, tr TimeRange, maxMetrics int)
extTSIDs, err = is.searchTSIDs(tfss, tr, maxMetrics)
extDB.putIndexSearch(is)
db.putToTagCache(tsids, tfKeyExtBuf.B)
sort.Slice(extTSIDs, func(i, j int) bool { return extTSIDs[i].Less(&extTSIDs[j]) })
extDB.putToTagCache(extTSIDs, tfKeyExtBuf.B)
}) {
if err != nil {
return nil, err