diff options
author | Dan Gudmundsson <[email protected]> | 2011-09-19 15:52:58 +0200 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2011-09-19 15:52:58 +0200 |
commit | a6bd22387b3647a5e2669314c800454ccde9b0b3 (patch) | |
tree | 50b624bf67e105c0c8ed398021f31d1ccd75dc53 | |
parent | 7ebf84abf7e5d06ce9ef6ec11783318aa393093d (diff) | |
download | otp-a6bd22387b3647a5e2669314c800454ccde9b0b3.tar.gz otp-a6bd22387b3647a5e2669314c800454ccde9b0b3.tar.bz2 otp-a6bd22387b3647a5e2669314c800454ccde9b0b3.zip |
[mnesia] Use api to log decisions.
Instead of just appending decisions to the log, use mnesia_log:log(Decision),
it will increment the counter which causes the log to be dumped even
if no actual commits are stored on this node.
This fixed a bug where the LATEST.log would grow forever on a node which
had the schema on disc, but where not involved in any commits.
-rw-r--r-- | lib/mnesia/src/mnesia_recover.erl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/mnesia/src/mnesia_recover.erl b/lib/mnesia/src/mnesia_recover.erl index b3eed1de6e..4750291a10 100644 --- a/lib/mnesia/src/mnesia_recover.erl +++ b/lib/mnesia/src/mnesia_recover.erl @@ -227,11 +227,13 @@ do_log_decision(D, DoTell, NodeD) -> note_outcome(D2), case mnesia_monitor:use_dir() of true -> - mnesia_log:append(latest_log, D2), if DoTell == true, Outcome /= unclear -> tell_im_certain(NodeD#decision.disc_nodes--[node()],D2), - tell_im_certain(NodeD#decision.ram_nodes--[node()], D2); + tell_im_certain(NodeD#decision.ram_nodes--[node()], D2), + mnesia_log:log(D2); + Outcome /= unclear -> + mnesia_log:log(D2); true -> ignore end; |