Tell me about it, I changed "dead" recently to volatile due to
unsynchronized access, now I've changed it so any remaining transitions
are processed prior to releasing the synchronized object lock.
If remaining transitions aren't processed tests can fail due to lost
events. The way a number of tests determine whether a services is
stilll available is by events, if these events aren't recieved, the test
fails.
I could really use a hand, I'm not able to generate the test failures on
my own hardware, so am reliant on Jenkins, which makes debugging almost
impossible.
Cheers,
Peter.
On 30/06/2013 5:14 AM, Gregg Wonderly wrote:
This is one of those things where you just say, really!
Gregg
On Jun 28, 2013, at 8:53 PM, peter_firmst...@apache.org wrote:
Author: peter_firmstone
Date: Sat Jun 29 01:53:28 2013
New Revision: 1497973
URL: http://svn.apache.org/r1497973
Log:
Ensure remaining transitions are processed prior to termination in
OperationJournal
Modified:
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/outrigger/OperationJournal.java
Modified:
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/outrigger/OperationJournal.java
URL:
http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/outrigger/OperationJournal.java?rev=1497973&r1=1497972&r2=1497973&view=diff
==============================================================================
---
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/outrigger/OperationJournal.java
(original)
+++
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/outrigger/OperationJournal.java
Sat Jun 29 01:53:28 2013
@@ -402,8 +402,12 @@ class OperationJournal extends Thread {
* Terminate queue processing.
*/
void terminate() {
- dead = true;
+ /* Only set dead to true while synchronized, this means that all
+ * pending transitions will be processed then wait() is called
+ * releasing the lock so queue processing can terminate.
+ */
synchronized (this){
+ dead = true;
notifyAll();
}
}