mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08:00
update docs, rename docs folder, add error condition
This commit is contained in:
parent
7b27dc2109
commit
faecfac2fa
|
@ -65,7 +65,7 @@ Strings are referenced by pointing to the beginning of their length field. The s
|
|||
### Series
|
||||
|
||||
The section contains a sequence of series that hold the label set of the series as well as its chunks within the block. The series are sorted lexicographically by their label sets.
|
||||
The file offset to the beginning of a series serves as the series' ID in all subsequent references. Thereby, a sorted list of series IDs implies a lexicographically sorted list of series label sets.
|
||||
Each series section is aligned to 16 bytes. The ID for a series is the `offset/16`. This serves as the series' ID in all subsequent references. Thereby, a sorted list of series IDs implies a lexicographically sorted list of series label sets.
|
||||
|
||||
```
|
||||
┌───────────────────────────────────────┐
|
|
@ -575,12 +575,12 @@ func NewReader(b ByteSlice, version int) (*Reader, error) {
|
|||
return newReader(b, nil, version)
|
||||
}
|
||||
|
||||
func NewReaderV1(b ByteSlice, c io.Closer, version int) (*Reader, error) {
|
||||
return newReader(b, c, version)
|
||||
}
|
||||
|
||||
// NewFileReader returns a new index reader against the given index file.
|
||||
func NewFileReader(path string, version int) (*Reader, error) {
|
||||
if version != 1 && version != 2 {
|
||||
return nil, errors.Errorf("unexpected file version %d", version)
|
||||
|
||||
}
|
||||
f, err := fileutil.OpenMmapFile(path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Reference in a new issue