aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mnesia/src/mnesia_tm.erl
diff options
context:
space:
mode:
authorBernard Duggan <[email protected]>2010-02-12 11:07:37 +1100
committerErlang/OTP <[email protected]>2010-03-30 10:16:29 +0200
commit999f1b99b295a69d3c505b601f14554acf4522d3 (patch)
treefe29f20c7d41dd97f524696f0d30786d5df8c1e7 /lib/mnesia/src/mnesia_tm.erl
parentaffd1f70dbcb96ed0bd92bf379ca86c12713ca30 (diff)
downloadotp-999f1b99b295a69d3c505b601f14554acf4522d3.tar.gz
otp-999f1b99b295a69d3c505b601f14554acf4522d3.tar.bz2
otp-999f1b99b295a69d3c505b601f14554acf4522d3.zip
Add mnesia activity subscription message
A process that calls mnesia:subscribe(activity) will receive the message: {mnesia_activity_event, ActivityID, complete} when any activity that caused a change to a database has finished committing its changes. This allows a subscriber to collect messages already available through the mnesia:subscribe({table, ...}) system to group them as completed transactions.
Diffstat (limited to 'lib/mnesia/src/mnesia_tm.erl')
-rw-r--r--lib/mnesia/src/mnesia_tm.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/mnesia/src/mnesia_tm.erl b/lib/mnesia/src/mnesia_tm.erl
index d42109c3da..f3ffac5493 100644
--- a/lib/mnesia/src/mnesia_tm.erl
+++ b/lib/mnesia/src/mnesia_tm.erl
@@ -1733,7 +1733,9 @@ do_commit(Tid, C, DumperMode) ->
R = do_snmp(Tid, C#commit.snmp),
R2 = do_update(Tid, ram_copies, C#commit.ram_copies, R),
R3 = do_update(Tid, disc_copies, C#commit.disc_copies, R2),
- do_update(Tid, disc_only_copies, C#commit.disc_only_copies, R3).
+ R4 = do_update(Tid, disc_only_copies, C#commit.disc_only_copies, R3),
+ mnesia_subscr:report_activity(Tid),
+ R4.
%% Update the items
do_update(Tid, Storage, [Op | Ops], OldRes) ->