Make DB blocks list public.

This enable computing the first timestamp in the DB
only accessing public interfaces.

Signed-off-by: Thibault Chataigner <t.chataigner@criteo.com>
pull/5805/head
Thibault Chataigner 7 years ago
parent 5fa1c993b9
commit 5ca18837e9

@ -520,6 +520,13 @@ func validateBlockSequence(bs []DiskBlock) error {
return nil
}
func (db *DB) Blocks() []DiskBlock {
db.mtx.RLock()
defer db.mtx.RUnlock()
return db.blocks
}
// Close the partition.
func (db *DB) Close() error {
close(db.stopc)

Loading…
Cancel
Save