PersistentJournal

View: New views
2 Messages — Rating Filter:   Alert me  

PersistentJournal

by gbarr-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Is there a design reason for the hang() method in PersistentJournal which
simply hangs up the current thread when it can't either create or append
to a journal?

We find that on load testing, temporary resource failures ( ulimit
excessions and/or running out of disk-space ) cause threads performing
prevayler transactions to hang ( and thus to lock out all the resources
held by those threads ).

Since the hang() method is obviously deliberate, it would suggest to me
that there is some utility in having a bunch of hung threads - does
prevayler provide some means of inspecting these and doing something with
them?

Any help much appreciated,

Graham



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Prevayler-coders mailing list
Prevayler-coders@...
https://lists.sourceforge.net/lists/listinfo/prevayler-coders

Re: PersistentJournal

by Justin T. Sampson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I changed that to a different mechanism at some point -- but I think
it was after the 2.3 release. I'll take a look later today to find the
revision that contains the change.

The idea is that if there's a failure in the journal in any thread,
Prevayler needs to stop processing transactions from all threads.
Someone's original attempt was to hang the thread that saw an
exception while it still holds an exclusive lock within Prevayler,
such that every other thread would also hang when trying to acquire
that lock.

The change I made was to set an error flag and then propogate the
exception, such that any other thread could get in, see the error flag
set, and throw an exception itself, allowing all the threads to
cleanup other resources & carry on or quit.

Cheers,
Justin




On 8/13/08, gbarr@... <gbarr@...> wrote:

> Is there a design reason for the hang() method in PersistentJournal which
> simply hangs up the current thread when it can't either create or append
> to a journal?
>
> We find that on load testing, temporary resource failures ( ulimit
> excessions and/or running out of disk-space ) cause threads performing
> prevayler transactions to hang ( and thus to lock out all the resources
> held by those threads ).
>
> Since the hang() method is obviously deliberate, it would suggest to me
> that there is some utility in having a bunch of hung threads - does
> prevayler provide some means of inspecting these and doing something with
> them?
>
> Any help much appreciated,
>
> Graham
>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Prevayler-coders mailing list
> Prevayler-coders@...
> https://lists.sourceforge.net/lists/listinfo/prevayler-coders
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Prevayler-coders mailing list
Prevayler-coders@...
https://lists.sourceforge.net/lists/listinfo/prevayler-coders