[erlang-questions] Amazon S3 backend for Mnesia
Ulf Wiger (TN/EAB)
ulf.wiger@REDACTED
Mon Jun 25 18:07:58 CEST 2007
Joel,
I think this is a bit too obscure a topic for the
list. (:
But generally speaking, it's very hard to say how
quickly a nodedown is detected. Worst case, the
node may suffer communication loss, and you'll
detect it only when the heartbeat times out
(which by default is about 1 minute, but we've
been able to squeeze it down to ca 10 seconds
by changing net_ticktime)
Specifically for your problem, the other nodes
would have to know whether the committed write
actually made it into the backend, and they
need to have some log of what was actually
written. Mnesia was built around the concept
of updating all persistent copies at once.
If you want to go to the backend from only
one copy, the others should probably do a
shadow commit to some kind of wrap log, so
that they can re-issue the failed update(s).
There could be others on this list that have
experience doing that sort of thing. I've
never tried it (at least not with Mnesia.)
BR,
Ulf W
> -----Original Message-----
> From: Joel Reymont [mailto:joelr1@REDACTED]
> Sent: den 25 juni 2007 17:36
> To: Ulf Wiger (TN/EAB)
> Cc: Erlang Questions
> Subject: Re: Amazon S3 backend for Mnesia
>
> Uffe,
>
> Suppose I pick the first node in the external_copies list. If
> I'm that node than I'll do the write and otherwise I'll do nothing.
>
> What happens when the first node in the list goes down?
>
> Does Mnesia update right away? How soon does it notice that
> the node has gone down?
>
> Does this mean that during that timeframe I'll be loosing
> transactions since the first node will be down and others
> won't be the first node?
>
> Thanks, Joel
>
> On Jun 4, 2007, at 3:13 PM, Ulf Wiger (TN/EAB) wrote:
>
> > If you only care about doing it on one node at a time, you
> could use
> > something like
> > mnesia_lib:val({Tab,where_to_write}) and compare that with
> > mnesia_lib:val({Tab,external_copies})
> > (in the rdbms patch), and simply pick the first one in the
> list (the
> > external_copies list will be in the same order on all nodes, but I
> > don't think where_to_write necessarily is.)
>
> --
> http://topdog.cc - EasyLanguage to C# compiler
> http://wagerlabs.com - Blog
>
>
>
>
>
>
More information about the erlang-questions
mailing list