From ebb37263a1535a2f592055327d93c3a6c3950acd Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Mon, 3 Jun 2024 23:45:59 +0200 Subject: [PATCH] wip --- app/vlselect/logsql/logsql.go | 2 +- docs/VictoriaLogs/CHANGELOG.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/vlselect/logsql/logsql.go b/app/vlselect/logsql/logsql.go index d6c141ed8..7fd0226be 100644 --- a/app/vlselect/logsql/logsql.go +++ b/app/vlselect/logsql/logsql.go @@ -381,7 +381,7 @@ func getLastNQueryResults(ctx context.Context, tenantIDs []logstorage.TenantID, return nil, err } - if len(rows) == limit || d == 0 { + if len(rows) == limit || d < 1e6 { sortRowsByTime(rows) if len(rows) > limit { rows = rows[:limit] diff --git a/docs/VictoriaLogs/CHANGELOG.md b/docs/VictoriaLogs/CHANGELOG.md index 598250081..fa1d2db3f 100644 --- a/docs/VictoriaLogs/CHANGELOG.md +++ b/docs/VictoriaLogs/CHANGELOG.md @@ -19,6 +19,7 @@ according to [these docs](https://docs.victoriametrics.com/victorialogs/quicksta ## tip +* FEATURE: parse timestamps in [`_time` filter](https://docs.victoriametrics.com/victorialogs/logsql/#time-filter) with nanosecond precision. * FEATURE: return the last `N` matching logs from [`/select/logsql/query` HTTP API](https://docs.victoriametrics.com/victorialogs/querying/#querying-logs) with the maximum timestamps if `limit=N` query arg is passed to it. Previously a random subset of matching logs could be returned, which could complicate investigation of the returned logs. * FEATURE: add [`drop_empty_fields` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#drop_empty_fields-pipe) for dropping [log fields](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) with empty values.