Skip to content

Commit

Permalink
updates unordered writes config docs (#4131)
Browse files Browse the repository at this point in the history
* updates unordered writes config docs

* removes experimental flag

* Apply suggestions from code review

Co-authored-by: Karen Miller <84039272+KMiller-Grafana@users.noreply.github.com>

Co-authored-by: Karen Miller <84039272+KMiller-Grafana@users.noreply.github.com>
  • Loading branch information
owen-d and KMiller-Grafana authored Aug 18, 2021
1 parent eb5643b commit 654b543
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions docs/sources/configuration/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1817,6 +1817,10 @@ logs in Loki.
# CLI flag: -ingester.max-global-streams-per-user
[max_global_streams_per_user: <int> | default = 0]
# When true, out of order writes are accepted.
# CLI flag: -ingester.unordered-writes
[unordered_writes: <bool> | default = false]
# Maximum number of chunks that can be fetched by a single query.
# CLI flag: -store.query-chunk-limit
[max_chunks_per_query: <int> | default = 2000000]
Expand Down
4 changes: 2 additions & 2 deletions docs/sources/operations/ordering.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ weight: 60

Enabling out of order writes involves two configuration options in Loki:

- `ingester.unordered-writes-enabled` must be enabled
- `ingester.unordered-writes` must be enabled. This is also configurable per tenants as part of [`limits_config`](../configuration#limits_config).
- `ingester.max-chunk-age` (default 1h) is used to parameterize _how far back out of order data is accepted_.

When unordered writes are enabled, Loki will accept older data for each stream as far back as `most_recent_line - (max_chunk_age/2)`. For instance, if `ingester.max-chunk-age=2h` and the stream `{foo="bar"}` has one entry at `8:00`, Loki will accept data for that stream as far back in time as `7:00`. If another log line is wrritten at `10:00`, this boundary changes to `9:00`. Anything farther back than this range will still return an _out of order_ error.
When unordered writes are enabled, Loki will accept older data for each stream as far back as `most_recent_line - (max_chunk_age/2)`. For instance, if `ingester.max-chunk-age=2h` and the stream `{foo="bar"}` has one entry at `8: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`, Loki will accept data for that stream as far back in time as `9:00`. Anything farther back will return an out of order error.

0 comments on commit 654b543

Please sign in to comment.