Would using WriteBarrier be as simple as "myMagmaSession allowWriteBarrier: true"? What drawbacks are there?
Once you load WriteBarrier (which I'm not sure how to do these days), yes, that should be it. I would not recommend turning it off and on while sessions are connected.
I was really excited about WriteBarrier at one time because it improves the peak commit rate from 24 per second to >100 per second. It's another a great idea from Avi.
I put some real work into supporting it with Magma but there is one test case which can't pass with WriteBarrier. #testClassSchemaUpgrades simulates developers changing the shape of classes with existing instances in Magma, that other users can run their version of the in-image class "out-of-sync" with the repository and not accidently truncate data. If you comment out that test case, all the others should (and did, last year at least) pass.
It turns out the problem lies within WriteBarrier's interaction with Squeak's metaclass layer. It is exposed by changing the instance variables of a *superclass*, such as:
Object ClassA ClassB
and changing the instance variables in ClassA will not work with WriteBarrier turned on (with or without Magma). I spent several late nights trying to fix it but I couldn't fix it. I still have detailed notes and scripts to reproduce the problem if you or anyone else wants to give it a shot.
Besides that bug and the fact that I haven't tested it in months, also know that I don't really have the time (or skill, apparently) to support it. If you have problems running with WriteBarrier, I probably wouldn't be able to help.
- Chris
magma@lists.squeakfoundation.org