diff options
author | Dan Gudmundsson <[email protected]> | 2018-08-08 12:14:40 +0200 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2018-08-08 12:14:40 +0200 |
commit | 9818fcc0b899c7d19f017dc3059a5c5f4b0b450c (patch) | |
tree | 4ca72c061cadcf0c9ed5680ceb44784bd35071d4 /lib/mnesia/src | |
parent | 857156bcadae45fe112911bd7ca735ac6f3ca9d2 (diff) | |
download | otp-9818fcc0b899c7d19f017dc3059a5c5f4b0b450c.tar.gz otp-9818fcc0b899c7d19f017dc3059a5c5f4b0b450c.tar.bz2 otp-9818fcc0b899c7d19f017dc3059a5c5f4b0b450c.zip |
Do NOT disc_load from ram_copies when master_node is set
Setting master_nodes to a node with ram_copies replica and
that node had not loaded the table, could cause it load an
empty table, even though (non master) nodes had disc_replicas.
This meant that tables where unexpected empty after multiple failures
happened. When this happen do not load the table and wait for user
to force_load it on some node, preferably with a disk copy.
Diffstat (limited to 'lib/mnesia/src')
-rw-r--r-- | lib/mnesia/src/mnesia_controller.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/mnesia/src/mnesia_controller.erl b/lib/mnesia/src/mnesia_controller.erl index 77013489b3..7a592f25f9 100644 --- a/lib/mnesia/src/mnesia_controller.erl +++ b/lib/mnesia/src/mnesia_controller.erl @@ -1456,7 +1456,8 @@ orphan_tables([Tab | Tabs], Node, Ns, Local, Remote) -> L = [Tab | Local], orphan_tables(Tabs, Node, Ns, L, Remote); Masters -> - R = [{Tab, Masters} | Remote], + %% Do not disc_load table from RamCopyHolders + R = [{Tab, Masters -- RamCopyHolders} | Remote], orphan_tables(Tabs, Node, Ns, Local, R) end; _ -> |