Merge lp:~pbeaman/akiban-persistit/fix-accumulator-restart-test into lp:akiban-persistit

Proposed by Peter Beaman
Status: Merged
Approved by: Nathan Williams
Approved revision: 398
Merged at revision: 399
Proposed branch: lp:~pbeaman/akiban-persistit/fix-accumulator-restart-test
Merge into: lp:akiban-persistit
Diff against target: 12 lines (+1/-1)
1 file modified
src/test/java/com/persistit/stress/unit/AccumulatorRestart.java (+1/-1)
To merge this branch: bzr merge lp:~pbeaman/akiban-persistit/fix-accumulator-restart-test
Reviewer Review Type Date Requested Status
Akiban Build User Needs Fixing
Nathan Williams Approve
Review via email: mp+136433@code.launchpad.net

Description of the change

Fix silly error in the stress test AccumulatorRestart. There is code that attempts to determine whether to trigger a new cycle based on temporal proximity to an actual or anticipated checkpoint. The trigger code uses a randomly generated integer timeOffset which falls between -500 and +500. In the special case where the randomly generated number is zero, the triggering condition never fires and the main cycle run in an infinite loop. Observed on persistit-stress-multi-config-2.

To post a comment you must log in.
Revision history for this message
Nathan Williams (nwilliams) wrote :

As described.

review: Approve
Revision history for this message
Akiban Build User (build-akiban) wrote :

There were 2 failures during build/test:

* job server-packages failed at build number 2825: http://172.16.20.104:8080/job/server-packages/2825/

* view must-pass failed: server-packages is red

review: Needs Fixing
Revision history for this message
Nathan Williams (nwilliams) wrote :

Unrelated failure.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/test/java/com/persistit/stress/unit/AccumulatorRestart.java'
2--- src/test/java/com/persistit/stress/unit/AccumulatorRestart.java 2012-11-23 19:40:49 +0000
3+++ src/test/java/com/persistit/stress/unit/AccumulatorRestart.java 2012-11-27 14:48:19 +0000
4@@ -170,7 +170,7 @@
5 }
6 }
7 if (_checkpointTime != 0) {
8- if (timeOffset > 0 && now > _checkpointTime + timeOffset) {
9+ if (timeOffset >= 0 && now > _checkpointTime + timeOffset) {
10 _checkpointTime = 0;
11 return true;
12 } else if (timeOffset < 0 && now > _checkpointTime + timeOffset + CHECKPOINT_INTERVAL * Util.MS_PER_S) {

Subscribers

People subscribed via source and target branches