This commit is contained in:
Aliaksandr Valialkin 2024-06-03 23:45:59 +02:00
parent 28cee4e9db
commit ebb37263a1
No known key found for this signature in database
GPG key ID: 52C003EE2BCDB9EB
2 changed files with 2 additions and 1 deletions

View file

@ -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]

View file

@ -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.