An embedded time-series database
This release comes with WAL (Write Ahead Log) support, which means a certain level of durability is guaranteed because the data on the memory partition is appended to the log file on the disk.
WAL is enabled by default in on-disk mode. This slightly affects the write performance, so if you want to disable it, give -1
to WithWALBufferedSize()
like:
storage, err := tstorage.NewStorage(
tstorage.WithDataPath("./data"),
tstorage.WithWALBufferedSize(-1),
)
This is a minor update with a couple of bug fixes.
WithRetention
option (#22)Data points will get automatically removed from the disk after a specified period of time after a disk partition was created.
storage, err := tstorage.NewStorage(
tstorage.WithDataPath("./data"),
tstorage.WithRetention(time.Hour*24)
)
Basically, all data points get ingested into the head partition. But sometimes data points get across the partition boundary, which should get into the next partition. From this version, tstorage doesn't discard them.
tstorage-server
to the Used by section. - by @bartmikatstorage v0.2.0 is here 🎉
This release mostly includes encoding improvements, which massively reduces the size of encoded data points. Facebook is publishing a paper called Gorilla: A Fast, Scalable, In-Memory Time Series Database, in which they introduced an encoding way that takes advantage of the characteristics of time series data. According to that, tstorage v0.2.0 encodes/decodes buffered data points right before flushing into a disk partition. For more details, see: https://nakabonne.dev/posts/write-tsdb-from-scratch/#encoding
Please note that it cannot decode data points encoded by previous versions as the encoding scheme is totally different from the old one and doesn't consider backward compatibility at all.
This release also contains a couple of tiny bug fixes around disk partitions.