---------- Forwarded message ----------
Date: Mon, 21 Jul 2008 15:59:22 -0600
From: Dave Smith <
dsm...@thehive.com>
To: Paul Mineiro <
pmin...@herbie.ddv.com>
Subject: Mnesiaex + commits
Paul,
So we've been doing some moderate-scale load testing with mnesiaex and
tcerl over the past week on R12B3 -- so far so good. One odd thing
that I have observed is that there seem to be some discrepancies with
what a "commit" means when using tcerl. Specifically, if one does a
put into a tcerl table and follows that up (after the txn, of course)
with exiting the erlang emulator via Ctrl-C, Ctrl-C (harsh, I know)
the value "committed" is no longer present when the system is
restarted. This is direct contrast to the mnesia/dets behaviour, where
a committed txn == guaranteed to be there, even if emulator is harshly
killed.
This unusual behaviour reveals itself in our tests with a db that has
a bunch of keys on restart, but no values (even though we're only
writing with transacations). The easy fix would appear to be a call to
tcbdbsync() on any write within the driver. Obviously, this is fraught
with performance implications. The only other alternative I can think
of is to somehow "know" when a transaction is done writing and kick a
call to tcbdb:sync -- but that's a little hacky as well. Am I missing
something here (other than a deep understanding of how tcerl is using
the mnesia txn system)? :)
Thanks,
D.