diff options
author | Zandra Hird <[email protected]> | 2015-02-11 15:16:21 +0100 |
---|---|---|
committer | Zandra Hird <[email protected]> | 2015-02-11 15:17:07 +0100 |
commit | 73996f6dabd8c90164da129ad5ac54293b3e4243 (patch) | |
tree | a52c37fbf0218c2fc7b28df62f0fca4dcdc13b3c /lib/mnesia/src/mnesia_loader.erl | |
parent | fd06c6e2262d651e0e62c2ed56ab639e746f988f (diff) | |
parent | fefb2d78cb10606f83ad4010fee6a8be4d4191f2 (diff) | |
download | otp-73996f6dabd8c90164da129ad5ac54293b3e4243.tar.gz otp-73996f6dabd8c90164da129ad5ac54293b3e4243.tar.bz2 otp-73996f6dabd8c90164da129ad5ac54293b3e4243.zip |
Merge branch 'richcarl/dcd-dumps'
* richcarl/dcd-dumps:
Make Mnesia DCD dump behaviour available via API
Make Mnesia DCD dump behaviour available via configuration
OTP-12481
Diffstat (limited to 'lib/mnesia/src/mnesia_loader.erl')
-rw-r--r-- | lib/mnesia/src/mnesia_loader.erl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/mnesia/src/mnesia_loader.erl b/lib/mnesia/src/mnesia_loader.erl index 530317bcdd..cbb3d7e430 100644 --- a/lib/mnesia/src/mnesia_loader.erl +++ b/lib/mnesia/src/mnesia_loader.erl @@ -69,9 +69,10 @@ do_get_disc_copy2(Tab, Reason, Storage, Type) when Storage == disc_copies -> ignore; _ -> mnesia_monitor:mktab(Tab, Args), - Count = mnesia_log:dcd2ets(Tab, Repair), - case ets:info(Tab, size) of - X when X < Count * 4 -> + _Count = mnesia_log:dcd2ets(Tab, Repair), + case mnesia_monitor:get_env(dump_disc_copies_at_startup) + andalso mnesia_dumper:needs_dump_ets(Tab) of + true -> ok = mnesia_log:ets2dcd(Tab); _ -> ignore |