AntidoteDB
  • Overview
  • Quickstart
  • Examples & Applications
    • Timeseries Load Generator
    • Antidote Web Shell
    • Calendar App
    • Todo List App
  • Tutorials
    • Java Tutorial
  • Related Projects
  • Architecture
    • Overview
    • Ring
    • Log
    • Materializer
    • Transaction Manager
    • Inter-DC Communication
    • Failure Modes
    • Datatypes in Antidote
    • Commit Hooks
    • Features Configuration
  • Deployment
    • Natively (Linux)
    • Local Docker Setup
    • Docker Compose Setups
    • Docker Swarm
    • Kubernetes
  • Monitoring
    • Prometheus and Grafana
  • API
    • Native (Erlang)
    • Protocol Buffer API
    • Erlang
    • Java
    • JavaScript
    • Go
    • Python
  • Benchmarking
    • Setup
    • Basho Bench
  • Tools
    • Logs and Cache Dump
  • Development
    • Setup & Environment
    • Building a Release
    • Testing
    • Contributing
    • Archived Works
  • Release Notes
    • 0.2.1
    • 0.1.1
    • 0.0.1
Powered by GitBook
On this page
  1. Architecture

Log

For each vnode in the ring, there exists one log file.

Currently the log is used for 3 things:

  • Loading the state of objects into the materialiser on restart (done by replaying the log).

  • Resending lost updates to external DCs.

  • Reading an older version of an object than what is available in memory.

Each log entry is defined by the following records:

-type log_operation() :: #log_operation{}.
-record(log_operation, {
    tx_id :: txid(),
    op_type :: update
             | prepare
             | commit
             | abort
             | noop,
    log_payload :: any_log_payload()
}).


-type any_log_payload() :: #update_log_payload{}
                         | #commit_log_payload{}
                         | #abort_log_payload{}
                         | #prepare_log_payload{}.
-type commit_log_payload() :: #commit_log_payload{}.
-type update_log_payload() :: #update_log_payload{}.
-type op_number() :: #op_number{}.
-type op_name() :: atom().
-type op_param() :: term().
-type op() :: {op_name(), op_param()}.


-record(commit_log_payload, {
    commit_time :: dc_and_commit_time(),
    snapshot_time :: snapshot_time()
}).

-record(update_log_payload, {
    key :: key(),
    bucket :: bucket(),
    type :: type(),
    op :: op()
}).

-record(abort_log_payload, {}).

-record(prepare_log_payload, {prepare_time :: non_neg_integer()}).

-record(op_number, {
    node :: undefined | {node(), dcid()},
    global :: undefined | non_neg_integer(),
    local :: undefined | non_neg_integer()
}).
PreviousRingNextMaterializer

Last updated 5 years ago