Export both FreelistArrayType and FreelistMapType so as to keep API compatibility

Signed-off-by: Benjamin Wang <wachao@vmware.com>
pull/459/head
Benjamin Wang 2023-04-11 18:58:53 +08:00
parent a2395be6b8
commit feccc712f1
1 changed files with 9 additions and 0 deletions

9
db.go
View File

@ -18,6 +18,15 @@ import (
// The time elapsed between consecutive file locking attempts.
const flockRetryTimeout = 50 * time.Millisecond
// Export both FreelistArrayType and FreelistMapType so as to keep API compatibility.
// TODO(ahrtr): eventually we should (step by step)
// 1. default to FreelistMapType;
// 2. remove the FreelistArrayType and do not export FreelistMapType;
const (
FreelistArrayType = common.FreelistArrayType
FreelistMapType = common.FreelistMapType
)
// DB represents a collection of buckets persisted to a file on disk.
// All data access is performed through transactions which can be obtained through the DB.
// All the functions on DB will return a ErrDatabaseNotOpen if accessed before Open() is called.