Documentation ¶
Index ¶
- Constants
- Variables
- type Bitpage
- func (b *Bitpage) CheckFreePages(except PageNum) bool
- func (b *Bitpage) Checkpoint(fs vfs.FS, dstDir string) (err error)
- func (b *Bitpage) Close() (err error)
- func (b *Bitpage) FreePage(pn PageNum, checked bool) error
- func (b *Bitpage) Get(pn PageNum, key []byte, khash uint32) ([]byte, bool, func(), base.InternalKeyKind)
- func (b *Bitpage) GetCacheMetrics() string
- func (b *Bitpage) GetNeedFlushPageNums(isForce bool) []PageNum
- func (b *Bitpage) GetPage(pn PageNum) *page
- func (b *Bitpage) GetPageCount() int
- func (b *Bitpage) GetPageDebugInfo(pn PageNum) PageDebugInfo
- func (b *Bitpage) GetPageStMutableDeleteKeyRate(pn PageNum) float64
- func (b *Bitpage) GetPageWriter(pn PageNum, sentinel []byte) *PageWriter
- func (b *Bitpage) ManualPageFlush(pn PageNum) error
- func (b *Bitpage) MarkFreePages(pns []PageNum)
- func (b *Bitpage) NewIter(pn PageNum, o *iterOptions) *PageIterator
- func (b *Bitpage) NewPage() (PageNum, error)
- func (b *Bitpage) PageFlush(pn PageNum, sentinel []byte, logTag string) error
- func (b *Bitpage) PageSplitEnd(pn PageNum, sps []*SplitPageInfo, retErr error)
- func (b *Bitpage) PageSplitStart(pn PageNum, log string) (sps []*SplitPageInfo, err error)
- func (b *Bitpage) PageSplitted(pn PageNum) bool
- func (b *Bitpage) PageSplitted2(pn PageNum) bool
- func (b *Bitpage) ResetStats()
- func (b *Bitpage) SetPage(pn PageNum, p *page)
- func (b *Bitpage) Stats() *Stats
- func (b *Bitpage) StatsToString() string
- type Bitrie
- func (bt *Bitrie) Add(key []byte, value []byte)
- func (bt *Bitrie) AnalyzeBytes() []byte
- func (bt *Bitrie) Finish()
- func (bt *Bitrie) Get(key []byte) ([]byte, bool)
- func (bt *Bitrie) InitWriter()
- func (bt *Bitrie) Serialize(tblalloc func(uint32) uint32, tblbytes func(uint32, uint32) []byte, ...) bool
- func (bt *Bitrie) SetReader(d []byte, offset uint32) bool
- func (bt *Bitrie) Size() uint32
- func (bt *Bitrie) ToBytes() []byte
- type FS
- type File
- type FileNum
- type FileType
- type Header
- type IterValidityState
- type PageDebugInfo
- type PageIterator
- func (i *PageIterator) Close() error
- func (i *PageIterator) Error() error
- func (i *PageIterator) First() (*internalKey, []byte)
- func (i *PageIterator) Last() (*internalKey, []byte)
- func (i *PageIterator) Next() (*internalKey, []byte)
- func (i *PageIterator) Prev() (*internalKey, []byte)
- func (i *PageIterator) SeekGE(key []byte) (*internalKey, []byte)
- func (i *PageIterator) SeekLT(key []byte) (*internalKey, []byte)
- func (i *PageIterator) SeekPrefixGE(prefix, key []byte, trySeekUsingNext bool) (*internalKey, []byte)
- func (i *PageIterator) SetBounds(lower, upper []byte)
- func (i *PageIterator) String() string
- type PageNum
- type PageWriter
- type SplitPageInfo
- type Stats
Constants ¶
View Source
const ( BitrieVersion = 1 BitrieHeaderSize = 18 BitrieKeySize = 1 BitrieIndexSize = 4 PruneKeySize = 2 PruneKeyValFlag = 1 )
Variables ¶
View Source
var ( ErrPageNotFound = errors.New("page not exist") ErrPageSplitted = errors.New("page splitted") ErrPageNotSplitted = errors.New("page not splitted") ErrPageFlushState = errors.New("page flush state err") ErrTableFull = errors.New("allocation failed because table is full") ErrTableSize = errors.New("tbl size is not large enough to hold the header") ErrTableOpenType = errors.New("tbl open type not support") )
Functions ¶
This section is empty.
Types ¶
type Bitpage ¶
type Bitpage struct {
// contains filtered or unexported fields
}
func (*Bitpage) CheckFreePages ¶
func (*Bitpage) GetCacheMetrics ¶
func (*Bitpage) GetNeedFlushPageNums ¶
func (*Bitpage) GetPageCount ¶
func (*Bitpage) GetPageDebugInfo ¶
func (b *Bitpage) GetPageDebugInfo(pn PageNum) PageDebugInfo
func (*Bitpage) GetPageStMutableDeleteKeyRate ¶ added in v1.2.0
func (*Bitpage) GetPageWriter ¶
func (b *Bitpage) GetPageWriter(pn PageNum, sentinel []byte) *PageWriter
func (*Bitpage) ManualPageFlush ¶ added in v1.1.0
func (*Bitpage) MarkFreePages ¶
func (*Bitpage) NewIter ¶
func (b *Bitpage) NewIter(pn PageNum, o *iterOptions) *PageIterator
func (*Bitpage) PageSplitEnd ¶
func (b *Bitpage) PageSplitEnd(pn PageNum, sps []*SplitPageInfo, retErr error)
func (*Bitpage) PageSplitStart ¶
func (b *Bitpage) PageSplitStart(pn PageNum, log string) (sps []*SplitPageInfo, err error)
func (*Bitpage) PageSplitted ¶
func (*Bitpage) PageSplitted2 ¶
func (*Bitpage) ResetStats ¶
func (b *Bitpage) ResetStats()
func (*Bitpage) StatsToString ¶
type Bitrie ¶
type Bitrie struct {
// contains filtered or unexported fields
}
func (*Bitrie) AnalyzeBytes ¶
func (*Bitrie) InitWriter ¶
func (bt *Bitrie) InitWriter()
type IterValidityState ¶
type IterValidityState int8
const ( IterExhausted IterValidityState = iota IterValid )
type PageDebugInfo ¶
type PageIterator ¶
type PageIterator struct {
// contains filtered or unexported fields
}
func (*PageIterator) Close ¶
func (i *PageIterator) Close() error
func (*PageIterator) Error ¶
func (i *PageIterator) Error() error
func (*PageIterator) First ¶
func (i *PageIterator) First() (*internalKey, []byte)
func (*PageIterator) Last ¶
func (i *PageIterator) Last() (*internalKey, []byte)
func (*PageIterator) Next ¶
func (i *PageIterator) Next() (*internalKey, []byte)
func (*PageIterator) Prev ¶
func (i *PageIterator) Prev() (*internalKey, []byte)
func (*PageIterator) SeekGE ¶
func (i *PageIterator) SeekGE(key []byte) (*internalKey, []byte)
func (*PageIterator) SeekLT ¶
func (i *PageIterator) SeekLT(key []byte) (*internalKey, []byte)
func (*PageIterator) SeekPrefixGE ¶
func (i *PageIterator) SeekPrefixGE(prefix, key []byte, trySeekUsingNext bool) (*internalKey, []byte)
func (*PageIterator) SetBounds ¶
func (i *PageIterator) SetBounds(lower, upper []byte)
func (*PageIterator) String ¶
func (i *PageIterator) String() string
type PageWriter ¶
type PageWriter struct { Sentinel []byte // contains filtered or unexported fields }
func (*PageWriter) FlushFinish ¶
func (w *PageWriter) FlushFinish() error
func (*PageWriter) MaybePageFlush ¶
func (w *PageWriter) MaybePageFlush(size uint64) bool
func (*PageWriter) Set ¶
func (w *PageWriter) Set(key internalKey, value []byte) error
func (*PageWriter) UpdateMetaTimestamp ¶
func (w *PageWriter) UpdateMetaTimestamp()
type SplitPageInfo ¶
Source Files ¶
- array_table.go
- array_table_iterator.go
- bitpage.go
- bitrie.go
- checkpoint.go
- compaction.go
- compaction_iter.go
- filename.go
- flushable.go
- internal.go
- manifest.go
- merging_iter.go
- merging_iter_heap.go
- page.go
- page_block.go
- page_block_iterator.go
- page_iterator.go
- page_writer.go
- read_state.go
- stats.go
- super_table.go
- super_table_index.go
- super_table_iterator.go
- table.go
Click to show internal directories.
Click to hide internal directories.