Skip to content

Commit

Permalink
🐛 fix log querying when no filter is given
Browse files Browse the repository at this point in the history
  • Loading branch information
linkdd committed Sep 1, 2024
1 parent 262278c commit 0690ee8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/data/logstorage/system_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ func (sys *QuerySystem) FetchLogs(

err := sys.storage.db.View(func(txn *badger.Txn) error {
keys := fetchKeysByTime(txn, stream, from, to)
keys = filterKeysByIndex(txn, stream, keys, filter)
if filter != nil {
keys = filterKeysByIndex(txn, stream, keys, filter)
}
sort.Sort(sort.Reverse(sort.StringSlice(keys)))

for _, key := range keys {
Expand Down

0 comments on commit 0690ee8

Please sign in to comment.