cache_dump.erl
and log_dump.erl
, both available here.cache_dump.erl
specificlog_dump.erl
specificets:all()
to retrieve a list of all the tables available at the node we're connecting to, example output should yield something like this:ets:i()
can be used to obtain more details about tables. Additional informations compared to ets:all()
call include id, type, size, mem, owner
.ets:tab2list(Tab)
- comfortably presents the table contents on screen (our particular output is explained a bit later)ets:tab2file(Tab, Filename)
- dumps table Tab
to file Filename
in binary format.ets:file2tab(Filename, Options)
- function reads a file produced by ets:tab2file
and creates the corresponding table.127.0.0.1
, registered under name antidote
, and your target dump directory is ./dump_dir/
(which will be created if it doesn't exist)/
in the dump directory's name is necessary. ./dump_dir
won't work, as it references a file according to unix conventions.log_operation :: log_operation()
part, that is, tx_id, op_type, log_payload
123-456.LOG
contains data relative to keys, where the first hashes to 123
and the last to 456
, they're stored in $_build/default/rel/antidote/data/*.LOG
sync_log
, definable in src/antidote.app.src
true
: local transactions will be stored on log synchronously, i.e. when the reply is sent the updates are guaranteed to be stored to disk (this is very slow in the current logging setup)false
: all updates are sent to the operating system to be stored to disk (eventually), but are not guaranteed to be stored durably on disk when the reply is sent[email protected] dump_directory
dump_directory
is required per unix conventionslog_dump-YEAR_MONTH_DAY-HOUR_MINUTE_SECOND.txt
calendar:now_to_local_time(erlang:timestamp()).
disk_log:accessible_logs()
call) and delivered following many-to-one scenario (all the logs are stored in a single dump file), in the directory specified as 2nd call argument.file:consult/1
and erlang:is_record/2,3
. The former allows to parse a file and store its contents into Erlang records - assuming they're properly formatted - the latter verifies the record integrity