Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
 - func FormatMemStats(memstats runtime.MemStats) string
 - func MakeDefaultMemtablePool(name string) *containers.VectorPool
 - func MakeDefaultTransientPool(name string) *containers.VectorPool
 - func MakeLockFileName(dirname string, name string) string
 - func PrintMemStats()
 - type Runtime
 - type RuntimeOption
 - func WithRuntimeFilterIndexCache(c model.LRUCache) RuntimeOption
 - func WithRuntimeMemtablePool(vp *containers.VectorPool) RuntimeOption
 - func WithRuntimeObjectFS(fs *objectio.ObjectFS) RuntimeOption
 - func WithRuntimeOptions(opts *options.Options) RuntimeOption
 - func WithRuntimeScheduler(s tasks.TaskScheduler) RuntimeOption
 - func WithRuntimeThrottle(t *Throttle) RuntimeOption
 - func WithRuntimeTransferTable(tt *model.HashPageTable) RuntimeOption
 - func WithRuntimeTransientPool(vp *containers.VectorPool) RuntimeOption
 
- type Throttle
 - type ThrottleOption
 
Constants ¶
      View Source
      
  
    const LockSuffix = ".lock"
    
      View Source
      
  
const ObjectMemUnit = mpool.MB * 64
    Variables ¶
This section is empty.
Functions ¶
func FormatMemStats ¶
func MakeDefaultMemtablePool ¶
func MakeDefaultMemtablePool(name string) *containers.VectorPool
func MakeDefaultTransientPool ¶
func MakeDefaultTransientPool(name string) *containers.VectorPool
func MakeLockFileName ¶
func PrintMemStats ¶
func PrintMemStats()
Types ¶
type Runtime ¶
type Runtime struct {
	VectorPool struct {
		Memtable  *containers.VectorPool
		Transient *containers.VectorPool
	}
	Cache struct {
		FilterIndex model.LRUCache
	}
	Throttle *Throttle
	Fs *objectio.ObjectFS
	TransferTable *model.HashPageTable
	Scheduler     tasks.TaskScheduler
	Options *options.Options
}
    func NewRuntime ¶
func NewRuntime(opts ...RuntimeOption) *Runtime
func (*Runtime) PrintVectorPoolUsage ¶
func (r *Runtime) PrintVectorPoolUsage()
type RuntimeOption ¶
type RuntimeOption func(*Runtime)
func WithRuntimeFilterIndexCache ¶
func WithRuntimeFilterIndexCache(c model.LRUCache) RuntimeOption
func WithRuntimeMemtablePool ¶
func WithRuntimeMemtablePool(vp *containers.VectorPool) RuntimeOption
func WithRuntimeObjectFS ¶
func WithRuntimeObjectFS(fs *objectio.ObjectFS) RuntimeOption
func WithRuntimeOptions ¶
func WithRuntimeOptions(opts *options.Options) RuntimeOption
func WithRuntimeScheduler ¶
func WithRuntimeScheduler(s tasks.TaskScheduler) RuntimeOption
func WithRuntimeThrottle ¶
func WithRuntimeThrottle(t *Throttle) RuntimeOption
func WithRuntimeTransferTable ¶
func WithRuntimeTransferTable(tt *model.HashPageTable) RuntimeOption
func WithRuntimeTransientPool ¶
func WithRuntimeTransientPool(vp *containers.VectorPool) RuntimeOption
type Throttle ¶
type Throttle struct {
	Compaction struct {
		// coarse grained throttle
		ActiveTasks         atomic.Int32
		MaxActiveTasksLimit int32
		MemUsed         atomic.Int64 // to be used in the future
		MaxMemUsedLimit int64        // to be used in the future
	}
}
    func NewThrottle ¶
func NewThrottle(opts ...ThrottleOption) *Throttle
func (*Throttle) AcquireCompactionQuota ¶
func (t *Throttle) AcquireCompactionQuota()
func (*Throttle) ReleaseCompactionQuota ¶
func (t *Throttle) ReleaseCompactionQuota()
func (*Throttle) TryApplyCompactionTask ¶
only used for fine grained throttle
type ThrottleOption ¶
type ThrottleOption func(*Throttle)
func WithThrottleCompactionMaxMemUsedLimit ¶
func WithThrottleCompactionMaxMemUsedLimit(limit int64) ThrottleOption
func WithThrottleCompactionMaxTasksLimit ¶
func WithThrottleCompactionMaxTasksLimit(limit int32) ThrottleOption
 Click to show internal directories. 
   Click to hide internal directories.