Skip to content
This repository has been archived by the owner on Aug 13, 2019. It is now read-only.

Update doc #250

Merged
merged 2 commits into from
Apr 3, 2018
Merged

Conversation

simonpasquier
Copy link
Contributor

This PR fixes a couple of typos in the format documentation. It also references this documentation from the main README file.

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.
Copy link
Contributor

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

Copy link
Contributor Author

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 |
└─────┴───┴───┴──────────────┴──────────────┴──────────────┴──────────────┴───────┘

@@ -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.
Copy link
Contributor

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.

@@ -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.
Copy link
Contributor

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.

@gouthamve
Copy link
Collaborator

LGTM! Thanks!

@gouthamve gouthamve merged commit 3733f14 into prometheus-junkyard:master Apr 3, 2018
@simonpasquier simonpasquier deleted the update-doc branch April 3, 2018 09:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants