Re: Food Tasting, Memory and Rolling Back Transactions.

Ross Rick <[email protected]>
Newsgroups gmane.comp.java.prevayler
Message-ID <[email protected]>
William,

Thanks.  I appreciate the response.   I have inserted a comment below.

R

On Jul 25, 2009, at 5:02 PM, William Pietri wrote:

> Hi, Rick.
>
> Ross Rick wrote:
>> As I understand it, food tasting keeps a complete duplicate model set
>> in memory and runs the transaction against the duplicate first to
>> ensure that it is safe.
>>
>> 1.   Is that correct?
>>
>
> That's my understanding.
>
>> 2.   If it is correct then is it correct to presume that I can
>> effectively double the amount of memory available to storage by
>> turning it off.
>>
>
> That is correct.
>> 3.   If I turn it off, what are the ramifications?    It seems
>> possible that rolling back a transaction would then be my
>> responibility.   Is that correct?
>>
>
> The risk is that a transaction blows up in the middle, leaving your
> model in an inconsistent state, one that might not be what you'd get
> from replaying the log. I think of that less as being responsible for
> rolling back, and more for being responsible that your transactions
> never, ever break. But perhaps it amounts to the same thing.

I am perfectly fine with testing everything I can before executing the  
transaction.  My issue would be with the things that are somewhat out  
of my control, like say, memory allocation.   I suppose in that  
situation I would have to force the user to quit anyway, and only be  
losing the last transaction, but I'm not so sure that's gonna work.

In my case, a single delete can cause a number of cascading deletes,  
with additional reassignments, for example a delete of a tree node  
could cause leaves to be removed as well plus branches  to be moved to  
the parent of the deleted node

So I doubt my ability to accurately to correctly roll back.   In that  
case, as rare as one hopes they are, a transaction roll back is really  
just an app restart or damn near, if I turn off food tasting.    I'm  
not complaining, I am just trying to be sure that I understand.


>
>> Finally,  closing the Prevayler, this should release all memory,  
>> right?
>
> Subject to all the joys of the JVM, that's my understanding. I haven't
> verified that myself, though, as my Prevayler instances tend to be
> long-lived.
>
> William
>
> ------------------------------------------------------------------------------
> _______________________________________________
> To unsubscribe go to the end of this page: http://lists.sourceforge.net/lists/listinfo/prevayler-discussion
> _______________________________________________
> "Databases in Memoriam" -- http://www.prevayler.org


------------------------------------------------------------------------------
_______________________________________________
To unsubscribe go to the end of this page: http://lists.sourceforge.net/lists/listinfo/prevayler-discussion
_______________________________________________
"Databases in Memoriam" -- http://www.prevayler.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.