Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrTruncatorAlreadyRunning = errors.New("truncator already running") ErrTruncatorAlreadyStopped = errors.New("truncator already stopped") )
Functions ¶
This section is empty.
Types ¶
type Truncator ¶
type Truncator struct {
// contains filtered or unexported fields
}
func NewTruncator ¶
func (*Truncator) Truncate ¶
Truncate discards all data from the database that is older than the retention period. Truncation discards an appendable log upto a given offset before time ts. First, the transaction is fetched which lies before the specified time period, and then the values are discarded upto the specified offset.
discard point | | v
--------+-------+--------+----------
| | | tn-1:vx tn:vx tn+1:vx
Click to show internal directories.
Click to hide internal directories.