See: Description
| Class | Description |
|---|---|
| Log |
Stores Raft log entries in a segmented log in memory or on disk.
|
| Segment |
Stores a sequence of entries with monotonically increasing indexes in a
Buffer. |
| SegmentDescriptor |
Stores information about a
Segment of the log. |
| SegmentDescriptor.Builder |
Segment descriptor builder.
|
| SegmentFile |
Segment file utility.
|
| SegmentManager | |
| Storage |
Immutable log configuration and
Log factory. |
| Storage.Builder |
Builds a
Storage configuration. |
| StorageCleaner |
Handles deletion of files.
|
| Enum | Description |
|---|---|
| StorageLevel |
Log storage level configuration values which control how logs are stored on disk or in memory. |
| Exception | Description |
|---|---|
| DescriptorException |
Segment descriptor exception.
|
| StorageException |
Log exception.
|
Logs are the vehicle through which Copycat servers persist and replicate state changes. The Copycat log is designed specifically for use with the Raft consensus algorithm. The log is partitioned into multiple files called segments. Each segment represents a sequence of indexes in the log. As entries are written to the log and segments fill up, the log rolls over to new segments. Once a completed segment has been written and the entries within it have been committed, the segment is compacted.
Log compaction is a two-stage process. The minor compaction
process periodically rewrites segments to remove non-tombstone and snapshot-related entries that have been released by the
state machine. The major compaction process periodically
rewrites segments to remove tombstones and combines multiple segments together to reduce the number of open file descriptors.
Copycat logs also support snapshotting. Each snapshot
taken of the state machine's state is associated with a number of snapshotted entries. When segments are compacted,
entries compacted by the last snapshot are removed from segment files on disk.
For more information on Copycat's log and log compaction algorithms, see the log documentation on the Atomix website.
Copyright © 2013–2016. All rights reserved.