docs: clarify max_chunk_age out-of-order window calculation (#21105)

Signed-off-by: pnkcaht <samzoovsk19@gmail.com>
This commit is contained in:
Sam Richard
2026-03-09 19:45:42 -03:00
committed by GitHub
parent e569e10eec
commit da4f7a6833
2 changed files with 12 additions and 0 deletions

View File

@@ -8065,12 +8065,18 @@ and be accepted with
```yaml
time_of_most_recent_line - (max_chunk_age/2)
```
This means the allowed out-of-order window is half of the configured max_chunk_age.
Log entries with timestamps that are after this earliest time are accepted.
Log entries further back in time return an out-of-order error.
For example, if `max_chunk_age` is 2 hours
and the stream `{foo="bar"}` has one entry at `8:00`,
the earliest accepted timestamp will be calculated as: 8:00 - (2h / 2) = `7:00`.
Loki will accept data for that stream as far back in time as `7:00`.
If another log line is written at `10:00`,
the earliest accepted timestamp becomes: 10:00 - (2h / 2) = `9:00`.
Loki will accept data for that stream as far back in time as `9:00`.

View File

@@ -159,12 +159,18 @@ and be accepted with
```yaml
time_of_most_recent_line - (max_chunk_age/2)
```
This means the allowed out-of-order window is half of the configured max_chunk_age.
Log entries with timestamps that are after this earliest time are accepted.
Log entries further back in time return an out-of-order error.
For example, if `max_chunk_age` is 2 hours
and the stream `{foo="bar"}` has one entry at `8:00`,
the earliest accepted timestamp will be calculated as: 8:00 - (2h / 2) = `7:00`.
Loki will accept data for that stream as far back in time as `7:00`.
If another log line is written at `10:00`,
the earliest accepted timestamp becomes: 10:00 - (2h / 2) = `9:00`.
Loki will accept data for that stream as far back in time as `9:00`.