checkpoint() = ra_idxterm()
effect() = {monitor, process, snapshot_writer, pid()} | {bg_work, function(), function()}
file_err() = ra_lib:file_err()
kind() = snapshot | checkpoint | recovery_checkpoint
meta() = snapshot_meta()
recovery_checkpoint() = ra_idxterm()
abstract datatype: state()
| abort_accept/1 | |
| accept_chunk/3 | |
| accepting/1 | |
| begin_accept/2 | |
| begin_read/2 | |
| begin_snapshot/5 | |
| complete_accept/4 | |
| complete_snapshot/4 | |
| context/2 | |
| current/1 | |
| current_snapshot_dir/1 | |
| delete/2 | |
| delete_recovery_checkpoint/1 | Delete the current recovery checkpoint. |
| directory/2 | |
| handle_error/3 | |
| highest_idx/1 | |
| indexes/1 | |
| init/7 | |
| init/8 | |
| init/9 | |
| init_ets/0 | |
| last_index_for/1 | |
| latest_checkpoint/1 | |
| make_snapshot_dir/3 | |
| pending/1 | |
| promote_checkpoint/2 | |
| read_chunk/3 | |
| read_meta/2 | |
| recover/1 | |
| recover_recovery_checkpoint/1 | Recover from the recovery checkpoint if it exists. |
| recovery_checkpoint/1 | |
| take_extra_checkpoints/1 | |
| take_older_checkpoints/2 | |
| write_indexes/2 | Indexes file format: "RASI" (4 bytes - magic) Version (1 byte - unsigned) CRC32 (4 bytes - unsigned 32-bit integer) Data (binary - term_to_binary of indexes). |
| write_recovery_checkpoint/4 | Write a recovery checkpoint synchronously during shutdown. |
accepting(X1::state()) -> option(ra_idxterm())
begin_read(State::state(), Context::map()) -> {ok, Meta::meta(), ReadState} | {error, term()}
ReadState = term()
begin_snapshot(Meta::meta(), MacModule::module(), MacState::term(), SnapKind::kind(), State::state()) -> {state(), [effect()]}
complete_accept(Chunk::term(), Num::non_neg_integer(), Machine::ra_machine:machine(), State0::state()) -> {state(), MacState::term(), ra_seq:state(), [effect()]}
complete_snapshot(IdxTerm::ra_idxterm(), X2::kind(), LiveIndexes::ra_seq:state(), State::state()) -> state()
context(X1::state(), Node::node()) -> map()
current(X1::state()) -> option(ra_idxterm())
current_snapshot_dir(X1::state()) -> option(file:filename_all())
delete(Dir, X2) -> any()
Delete the current recovery checkpoint.
directory(X1::state(), X2::kind()) -> option(file:filename_all())
handle_error(IDX_TERM::{ra:index(), ra_term()}, Error::term(), State::state()) -> state()
highest_idx(X1::state()) -> ra_index()
indexes(Dir::file:filename_all()) -> {ok, ra_seq:state()} | {error, invalid_format | {invalid_version, integer()} | checksum_error | file:posix()}
init(UId::ra_uid(), Module::module(), SnapshotsDir::file:filename_all(), CheckpointDir::file:filename_all(), Machine::option(ra_machine:machine()), Counter::undefined | counters:counters_ref(), MaxCheckpoints::pos_integer()) -> state()
init(UId::ra_uid(), Module::module(), SnapshotsDir::file:filename_all(), CheckpointDir::file:filename_all(), RecoveryCheckpointDir::option(file:filename_all()), Machine::option(ra_machine:machine()), Counter::undefined | counters:counters_ref(), MaxCheckpoints::pos_integer()) -> state()
init(UId::ra_uid(), Module::module(), SnapshotsDir::file:filename_all(), CheckpointDir::file:filename_all(), RecoveryCheckpointDir::option(file:filename_all()), SyncServer::undefined | ra_log_sync:pool_ref(), Machine::option(ra_machine:machine()), Counter::undefined | counters:counters_ref(), MaxCheckpoints::pos_integer()) -> state()
init_ets() -> ok
last_index_for(UId::ra_uid()) -> option(ra_index())
latest_checkpoint(X1::state()) -> option(checkpoint())
make_snapshot_dir(Dir, Index, Term) -> any()
pending(X1::state()) -> option({ra_idxterm(), kind()})
promote_checkpoint(Idx::ra_index(), State0::state()) -> {boolean(), State::state(), Effects::[effect()]}
read_chunk(ReadState, ChunkSizeBytes::non_neg_integer(), State::state()) -> {ok, Data::term(), {next, ReadState} | last} | {error, term()}
ReadState = term()
read_meta(Module::module(), Location::file:filename_all()) -> {ok, meta()} | {error, invalid_format | {invalid_version, integer()} | checksum_error | file_err() | term()}
recover(X1::state()) -> {ok, Meta::meta(), State::term()} | {error, no_current_snapshot} | {error, term()}
recover_recovery_checkpoint(X1::state()) -> {ok, Meta::meta(), State::term()} | {error, no_recovery_checkpoint} | {error, term()}
Recover from the recovery checkpoint if it exists. This is used by ra_server:recover/1 to skip log replay when a recovery checkpoint with a higher index than the snapshot exists.
recovery_checkpoint(X1::state()) -> option(recovery_checkpoint())
take_extra_checkpoints(State0::state()) -> {state(), [checkpoint()]}
take_older_checkpoints(Idx::ra_index(), State0::state()) -> {state(), [checkpoint()]}
write_indexes(Dir::file:filename_all(), Indexes::ra_seq:state()) -> ok | {error, file:posix()}
Indexes file format: "RASI" (4 bytes - magic) Version (1 byte - unsigned) CRC32 (4 bytes - unsigned 32-bit integer) Data (binary - term_to_binary of indexes)
write_recovery_checkpoint(Meta::meta(), MacState::term(), SnapModule::module(), State::state()) -> {ok, state()} | {error, term()}
Write a recovery checkpoint synchronously during shutdown. Recovery checkpoints store the machine state to skip log replay on restart. They don't include live indexes - those are recovered from the last snapshot/checkpoint.
Generated by EDoc