diff --git a/lib/logstorage/query_stats.go b/lib/logstorage/query_stats.go index c475cb2249..0cdc16e4c9 100644 --- a/lib/logstorage/query_stats.go +++ b/lib/logstorage/query_stats.go @@ -44,6 +44,9 @@ type QueryStats struct { // BytesProcessedUncompressedValues is the total number of uncompressed values bytes processed during the search. BytesProcessedUncompressedValues uint64 + + // IsPartial is the field for setting later the VL-Partial-Response header. + IsPartial atomic.Bool } // GetBytesReadTotal returns the total number of bytes read, which is tracked by qs. diff --git a/lib/logstorage/storage_search.go b/lib/logstorage/storage_search.go index f4c0853b86..a02acc3b22 100644 --- a/lib/logstorage/storage_search.go +++ b/lib/logstorage/storage_search.go @@ -80,6 +80,7 @@ func newQueryContext(ctx context.Context, qs *QueryStats, tenantIDs []TenantID, if q.opts.allowPartialResponse != nil { // query options override other settings for allowPartialResponse. allowPartialResponse = *q.opts.allowPartialResponse + qs.IsPartial.Swap(allowPartialResponse) } return &QueryContext{