Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updates unordered writes config docs #4131

Merged
merged 3 commits into from
Aug 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.