-
Notifications
You must be signed in to change notification settings - Fork 180
Update doc #250
Update doc #250
Conversation
Documentation/format/index.md
Outdated
A label index section indexes the existing (combined) values for one or more label names. | ||
The `#names` field determines the number indexed label names, followed by the total number of entries in the `#entries` field. The body holds `#entries` symbol table reference tuples of length of length `#names`. The value tuples are sorted in lexicographically increasing order. | ||
A label index section indexes the existing (combined) values for one or more label names. | ||
The `#names` field determines the number of indexed label names, followed by the total number of entries in the `#entries` field. The body holds `#entries` symbol table reference tuples of length `#names`. The value tuples are sorted in lexicographically increasing order. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can make this a little clearer. It's kinda confusing right now, especially this sentence: the body holds #entries
symbol table reference tuples of length #names
.
In the code, this section is being populated here: https://github.com/prometheus/tsdb/blob/master/index/index.go#L350
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about?
the body holds
#entries / #names
tuples of symbol table references, each tuple being of#names
length.
There could also be an concrete example.
For instance, a single label name with 4 different values will be encoded as:
┌─────┬───┬───┬──────────────┬──────────────┬──────────────┬──────────────┬───────┐
│ len │ 1 │ 4 │ ref(value_0) | ref(value_1) | ref(value_2) | ref(value_3) | CRC32 |
└─────┴───┴───┴──────────────┴──────────────┴──────────────┴──────────────┴───────┘
Documentation/format/index.md
Outdated
@@ -139,11 +139,11 @@ The `#names` field determines the number indexed label names, followed by the to | |||
└─────────────────────────────────────────────────┘ | |||
``` | |||
|
|||
The sequence of label index sections is finalized by an offset table pointing to the beginning of each label index section for a given set of label names. | |||
The sequence of label index sections is finalized by an [offset table](#offset-table) pointing to the beginning of each label index section for a given set of label names. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The wording needs to be fixed here. "is finalized by" makes it sound like the section itself ends with an offset table which isn't the case.
Documentation/format/index.md
Outdated
@@ -161,7 +161,7 @@ Postings sections store monotonically increasing lists of series references that | |||
└─────────────────────────────────────────┘ | |||
``` | |||
|
|||
The sequence of postings sections is finalized by an offset table pointing to the beginning of each postings section for a given set of label names. | |||
The sequence of postings sections is finalized by an [offset table](#offset-table) pointing to the beginning of each postings section for a given set of label names. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above for this too, the sentence needs rephrasing.
d588e92
to
7206a84
Compare
LGTM! Thanks! |
This PR fixes a couple of typos in the format documentation. It also references this documentation from the main README file.