obj

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2024 License: MIT Imports: 7 Imported by: 5

Documentation

Overview

Package obj atomically installs objects from modified buffers in their corresponding disk blocks and writes the blocks to the write-ahead log. The upper layers are responsible for locking and lock ordering.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Log

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

Log mediates access to object loading and installation.

There is only one Log object.

func MkLog added in v0.2.1

func MkLog(d disk.Disk) *Log

MkLog recovers the object logging system (or initializes from an all-zero disk).

func (*Log) CommitWait

func (l *Log) CommitWait(bufs []*buf.Buf, wait bool) bool

Commit dirty bufs of the transaction into the log, and perhaps wait.

func (*Log) Flush

func (l *Log) Flush() bool

NOTE: this is coarse-grained and unattached to the transaction ID

func (*Log) Load

func (l *Log) Load(addr addr.Addr, sz uint64) *buf.Buf

Read a disk object into buf

func (*Log) LogSz

func (l *Log) LogSz() uint64

LogSz returns 511 (the size of the wal log)

func (*Log) Shutdown

func (l *Log) Shutdown()

Jump to

Keyboard shortcuts

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