View Source API Reference ex_wal v0.3.0

Modules

ExWal is a project that aims to provide a solution for managing write-ahead log (WAL) in Elixir.

This module provides a macro for defining compile-time constants in Elixir code.

Debug tools

General exception with an optional string, map, or Keyword list stored in exception details

Default implementation of the ExWal.FS protocols.

Syncing file system. This implementation create syncing file which provider better write performance.

File protocol

Syncing file implementation. This implementation do syncing work automatically after writting. See may_sync function for specific synchronization conditions

A LogReader takes an ordered sequence of physical WAL files ("segments"), providing a merged view of the WAL's logical contents. It's responsible for filtering duplicate records which may be shared by the tail of a segment file and the head of its successor.

A virtual log consists of a set of segments. Each segment is a physical WAL file.

Writer writes to a virtual WAL. A Writer in standalone mode maps to a single LogWriter. In failover mode, it can failover across multiple physical log files.

FailoverWriter is the implementation of LogWriter in failover mode.

log writer writes records to a WAL file.

The manager protocol for the WAL.

A block of data in a WAL file.

The wire format is that the stream is divided into 32KiB blocks, and each block contains a number of tightly packed chunks. Chunks cannot cross block boundaries. The last block may be shorter than 32 KiB. Any unused bytes in a block must be zero.

The recyclyable chunk format is similar to the legacy format, but extends the chunk header with an additional log number field. This allows reuse (recycling) of log files which can provide significantly better performance when syncing frequently as it avoids needing to update the file metadata. Additionally, recycling log files is a prequisite for using direct IO with log writing. The recyclyable format is

The Recycler protocol defines the behaviour of a WAL file recycler.

An ETS based WAL file recycler.

Common typespecs for ExWal