common

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// invalid page id
	InvalidPageID = -1
	// invalid transaction id
	InvalidTxnID = -1
	// invalid log sequence number
	InvalidLSN = -1
	// the header page id
	HeaderPageID = 0
	// size of a data page in byte
	PageSize = 4096
	// size of buffer pool
	BufferPoolSize = 10
	// size of a log buffer in byte
	LogBufferSize = ((BufferPoolSize + 1) * PageSize)
	// size of extendible hash bucket
	BucketSize = 50
)
View Source
const (
	MaxReaders = math.MaxUint32
)

Variables

View Source
var CycleDetectionInterval time.Duration
View Source
var EnableDebug bool = false
View Source
var EnableLogging bool = false
View Source
var LogTimeout time.Duration

Functions

func SH_Assert

func SH_Assert(condition bool, msg string)

Types

type ReaderWriterLatch

type ReaderWriterLatch interface {
	WLock()
	WUnlock()
	RLock()
	RUnlock()
}

func NewRWLatch

func NewRWLatch() ReaderWriterLatch

type SH_Mutex

type SH_Mutex struct {
	// contains filtered or unexported fields
}

func NewSH_Mutex

func NewSH_Mutex() *SH_Mutex

func (*SH_Mutex) Lock

func (m *SH_Mutex) Lock()

func (*SH_Mutex) Unlock

func (m *SH_Mutex) Unlock()

type SlotOffset

type SlotOffset uintptr // slot offset type

type LSN int32 // log sequence number

type TxnID

type TxnID int32 // transaction id type

type FrameID int32 // frame id type type PageID int32 // page id type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL