Merge lp:~pbeaman/akiban-persistit/fix-1043536-deadlock-under-clover into lp:akiban-persistit
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Nathan Williams | ||||
Approved revision: | 360 | ||||
Merged at revision: | 360 | ||||
Proposed branch: | lp:~pbeaman/akiban-persistit/fix-1043536-deadlock-under-clover | ||||
Merge into: | lp:akiban-persistit | ||||
Diff against target: |
59 lines (+6/-3) 4 files modified
src/test/java/com/persistit/AccumulatorTest.java (+1/-1) src/test/java/com/persistit/JournalManagerTest.java (+1/-1) src/test/java/com/persistit/MVCCConcurrentTest.java (+1/-1) src/test/java/com/persistit/PersistitUnitTestCase.java (+3/-0) |
||||
To merge this branch: | bzr merge lp:~pbeaman/akiban-persistit/fix-1043536-deadlock-under-clover | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Nathan Williams | Approve | ||
Review via email: mp+122104@code.launchpad.net |
Description of the change
Fix bug 1043536 (we hope). The bug appears to occur when an assert caused by a timeout occurs in JournalManagerTest, leaving the ThreadSequencer state in an unexpectedly enabled state. The fix ensures that ThreadSequencer is disabled after every test, and it lengthens the timeouts by a factor of 5.
The theory behind lengthening the timeouts is that execution of the instrumented Clover code is much slower and therefore threads that normally complete in much less than the sanity timeout are slow enough under Clover to exceed the timeout. There's no proof that 5x is sufficient or necessary, but there's also no proof that the original timeouts were reasonable; they are chosen as a sanity outer bound, and the objective of the timeout should be to eventually signal a failure-to-complete problem within a scale that's reasonable given that the test machines need to perform other tasks.
I was unable to reproduce this phenomenon and therefore have no unit test for it. The test will be whether persistit-coverage continues to fail in the same way.
Looks reasonable to me.