What is MagmaDifferentBranch?

Chris Muller asqueaker at gmail.com
Thu Oct 13 19:43:25 UTC 2016


The explanation of MagmaDifferentBranch requires some background.
Commits to a Magma DB are completely atomic.  It uses its journaling
system to accomplish this.  Each journal record is sequenced and
hashed, and each carries a #branchCode identifying that copy of the
database.  Each record is flushed to a flat file, "commits.log" in the
DB's directory.

In headless systems, these journal records are automatically applied
to any old backup of the DB which might be started there, and "roll
forward" to the present, or to some point before the present.  That
can be useful in rare circumstances in case, say, a bug in your
application made a wrong update to a lot of objects with no way for
the application to undo it.  In that case, Magma can undo it.

There are a couple of other use-cases for roll-forward, but point is
that this roll-forward process must have an extra safety check to make
absolutely sure the records being imported are FOR the DB they're
being imported into.

So, MagmaDifferentBranch is a signal to protect the database from
writing something that does not look right.

HTH,
  Chris

On Thu, Oct 13, 2016 at 12:47 AM, Doug Rollwitz <drcolorow at gmail.com> wrote:
> I am new to Magma.  I am working with 1.5 Server edition, in Squeak 5.0.  I
> have a collection that will be in the tens of thousands of elements so I
> created a Magma collection with two MaAsciiStringIndexes.  As I add an
> object to this collection, I get a MagmaDifferentBranch error, which I can't
> get past, and I don't understand what the error is.  I have been struggling
> with getting this set up,  so there may be issues with the state of the
> database repository.
>
> Any help understanding this error would be appreciated.
>
> Sincerely,
>
> Doug
>
> _______________________________________________
> Magma mailing list
> Magma at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/magma
>


More information about the Magma mailing list