# README
TSDB
This repository contains the Prometheus storage layer that is used in its 2.x releases.
A writeup of its design can be found here.
Based on the Gorilla TSDB white papers.
Video: Storing 16 Bytes at Scale from PromCon 2017.
See also the format documentation.
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package fileutil provides utility methods used when dealing with the filesystem in tsdb.
Package goversion enforces the go version supported by the tsdb module.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Functions
BeyondSizeRetention returns those blocks which are beyond the size retention set in the db options.
BeyondTimeRetention returns those blocks which are beyond the time retention set in the db options.
CreateBlock creates a chunkrange block from the samples passed to it, and writes it to disk.
CreateHead creates a TSDB writer head to write the sample data to.
DefaultBlocksToDelete returns a filter which decides time based and size based retention from the options of the db.
DefaultOptions used for the DB.
ExponentialBlockRanges returns the time ranges based on the stepSize.
MigrateWAL rewrites the deprecated write ahead log into the new format.
NewBlockChunkQuerier returns a chunk querier against the block reader and requested min and max time range.
NewBlockQuerier returns a querier against the block reader and requested min and max time range.
NewHead opens the head block in dir.
NewLeveledCompactor returns a LeveledCompactor.
NewRangeHead returns a *RangeHead.
Open returns a new DB in the given directory.
OpenBlock opens the block in the directory.
OpenDBReadOnly opens DB in the given directory for read only operations.
OpenSegmentWAL opens or creates a write ahead log in the given directory.
OverlappingBlocks returns all overlapping blocks from given meta files.
PostingsForMatchers assembles a single postings iterator against the index reader based on the given matchers.
# Constants
Default duration of a block in milliseconds.
DefaultStripeSize is the default number of entries to allocate in the stripeSeries hash map.
Entry types in a segment file.
Entry types in a segment file.
Entry types in a segment file.
Entry types in a segment file.
WALFormatDefault is the version flag for the default outer segment file format.
WALMagic is a 4 byte number every WAL segment file starts with.
# Variables
ErrAppenderClosed is returned if an appender has already be successfully rolled back or committed.
ErrClosed is returned when the db is closed.
ErrClosing is returned when a block is in the process of being closed.
ErrInvalidSample is returned if an appended sample is not valid and can't be ingested.
No description provided by the author
ErrNotReady is returned if the underlying storage is not ready yet.
# Structs
Block represents a directory of time series data covering a continuous time range.
BlockDesc describes a block by ULID and time range.
BlockMeta provides meta information about a block.
BlockMetaCompaction holds information about compactions a block went through.
BlockStats contains stats about contents of a block.
DB handles reads and writes of time series falling into a hashed partition of a seriedb.
DBReadOnly provides APIs for read only operations on a database.
Head handles reads and writes of time series data within a time window.
LeveledCompactor implements the Compactor interface.
No description provided by the author
Options of the DB storage.
No description provided by the author
SegmentWAL is a write ahead log for series data.
No description provided by the author
TimeRange specifies minTime and maxTime range.
# Interfaces
BlockReader provides reading access to a data block.
ChunkReader provides reading access of serialized time series data.
ChunkWriter serializes a time block of chunked series data.
Compactor provides compaction against an underlying storage of time series data.
IndexReader provides reading access of serialized index data.
IndexWriter serializes the index for a block of series data.
SeriesLifecycleCallback specifies a list of callbacks that will be called during a lifecycle of a series.
WAL is a write ahead log that can log new series labels and samples.
WALReader reads entries from a WAL.
# Type aliases
No description provided by the author
Overlaps contains overlapping blocks aggregated by overlapping range.
WALEntryType indicates what data a WAL entry contains.