Merge lp:~pbeaman/akiban-persistit/fix-1044513-assert-in-IntegrityCheckTest2 into lp:akiban-persistit

Proposed by Peter Beaman
Status: Merged
Approved by: Nathan Williams
Approved revision: 361
Merged at revision: 361
Proposed branch: lp:~pbeaman/akiban-persistit/fix-1044513-assert-in-IntegrityCheckTest2
Merge into: lp:akiban-persistit
Diff against target: 26 lines (+2/-2)
2 files modified
src/main/java/com/persistit/Persistit.java (+1/-1)
src/test/java/com/persistit/IntegrityCheckTest.java (+1/-1)
To merge this branch: bzr merge lp:~pbeaman/akiban-persistit/fix-1044513-assert-in-IntegrityCheckTest2
Reviewer Review Type Date Requested Status
Akiban Build User Needs Fixing
Nathan Williams Approve
Review via email: mp+122358@code.launchpad.net

Description of the change

Small changes to fix a race in IntegrityCheckTest. Sometime the CLEANUP_MANAGER thread was able to prune all the pages that the test needed to prune in the foreground.

One significant change is that the call in Persistit#initialize(Configuration) to pruneObsoleteTransactions now respects the setting of the JournalManager's _rollbackPruning flag. This is benign because only tests ever disable this flag. If the application intended to disable rollback pruning, it could do so either before or after the initialize method has been called to control the startup behavior. Today a first pass of rollback pruning is always done, so the change potentially gives an application more control.

Note: the proposal replaces the original one and should be merged first so that the harden-CLI branch can build.

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

Short and sweet.

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

There were 2 failures during build/test:

* job persistit-build failed at build number 419: http://172.16.20.104:8080/job/persistit-build/419/

* view must-pass failed: persistit-build is yellow

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

Unrelated bug1019001 again.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/main/java/com/persistit/Persistit.java'
--- src/main/java/com/persistit/Persistit.java 2012-08-28 14:29:50 +0000
+++ src/main/java/com/persistit/Persistit.java 2012-08-31 20:23:41 +0000
@@ -595,7 +595,7 @@
595 startTransactionIndexPollTask();595 startTransactionIndexPollTask();
596 flush();596 flush();
597 _checkpointManager.checkpoint();597 _checkpointManager.checkpoint();
598 _journalManager.pruneObsoleteTransactions(true);598 _journalManager.pruneObsoleteTransactions();
599599
600 startCleanupManager();600 startCleanupManager();
601 _initialized.set(true);601 _initialized.set(true);
602602
=== modified file 'src/test/java/com/persistit/IntegrityCheckTest.java'
--- src/test/java/com/persistit/IntegrityCheckTest.java 2012-08-24 13:57:19 +0000
+++ src/test/java/com/persistit/IntegrityCheckTest.java 2012-08-31 20:23:41 +0000
@@ -179,8 +179,8 @@
179 _persistit = new Persistit();179 _persistit = new Persistit();
180 _persistit.getRecoveryManager().setRecoveryDisabledForTestMode(true);180 _persistit.getRecoveryManager().setRecoveryDisabledForTestMode(true);
181 _persistit.getJournalManager().setRollbackPruningEnabled(false);181 _persistit.getJournalManager().setRollbackPruningEnabled(false);
182 disableBackgroundCleanup();
183 _persistit.initialize(properties);182 _persistit.initialize(properties);
183 disableBackgroundCleanup();
184184
185 for (int i = 0; i < 10; i++) {185 for (int i = 0; i < 10; i++) {
186 final Exchange ex = _persistit.getExchange(_volumeName, "mvv" + i, true).append(Key.BEFORE);186 final Exchange ex = _persistit.getExchange(_volumeName, "mvv" + i, true).append(Key.BEFORE);

Subscribers

People subscribed via source and target branches