Merge lp:~pbeaman/akiban-persistit/improve-icheck into lp:akiban-persistit

Proposed by Peter Beaman
Status: Merged
Approved by: Nathan Williams
Approved revision: 328
Merged at revision: 328
Proposed branch: lp:~pbeaman/akiban-persistit/improve-icheck
Merge into: lp:akiban-persistit
Diff against target: 44 lines (+9/-5)
1 file modified
src/main/java/com/persistit/IntegrityCheck.java (+9/-5)
To merge this branch: bzr merge lp:~pbeaman/akiban-persistit/improve-icheck
Reviewer Review Type Date Requested Status
Nathan Williams Approve
Review via email: mp+112202@code.launchpad.net

Description of the change

Tiny changes to add important information to couple of Faults. No test because there is almost no logic to test.

New format:
  Tree persistit:shared Invalid right sibling address in page 81,326 after walking right 719 (path 9,835->110,879->75,079) depth=3

Old format:

 Tree persistit:shared Invalid right sibling address (path 9,835->110,879->81,326) depth=3

The old format is useless because the problem starts in page 75,079, not page 81,326 which is 719 jumps away.

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

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/main/java/com/persistit/IntegrityCheck.java'
2--- src/main/java/com/persistit/IntegrityCheck.java 2012-06-08 00:06:12 +0000
3+++ src/main/java/com/persistit/IntegrityCheck.java 2012-06-26 19:52:20 +0000
4@@ -87,7 +87,6 @@
5 private Value _value = new Value((Persistit) null);
6 private MVVVisitor _versionVisitor = new MVVVisitor();
7
8-
9 private static class Counters {
10
11 private long _indexPageCount = 0;
12@@ -777,9 +776,12 @@
13 counters.difference(_counters);
14 faults = _faults.size() - faults;
15 if (_csv) {
16- postMessage(String.format("\"%s\",\"%s\",%d,%s", resourceName(volume), "*", faults, counters.toCSV()), LOG_NORMAL);
17+ postMessage(String.format("\"%s\",\"%s\",%d,%s", resourceName(volume), "*", faults, counters.toCSV()),
18+ LOG_NORMAL);
19 } else {
20- postMessage("Volume " + resourceName(volume) + String.format(" Faults:%,3d ", faults) + counters.toString(), LOG_VERBOSE);
21+ postMessage(
22+ "Volume " + resourceName(volume) + String.format(" Faults:%,3d ", faults) + counters.toString(),
23+ LOG_VERBOSE);
24 }
25
26 return faults == 0;
27@@ -1078,13 +1080,15 @@
28 }
29
30 if (page <= 0 || page > Buffer.MAX_VALID_PAGE_ADDR) {
31- addFault("Invalid right sibling address", buffer.getPageAddress(), level, 0);
32+ addFault(String.format("Invalid right sibling address in page %,d after walking right %,d", buffer
33+ .getPageAddress(), walkCount), startingBuffer.getPageAddress(), level, 0);
34 key.clear();
35 oldBuffer = buffer;
36 return startingBuffer;
37 }
38 if (walkCount-- <= 0) {
39- addFault("More than " + Exchange.MAX_WALK_RIGHT + " unindexed siblings", page, level, 0);
40+ addFault("More than " + Exchange.MAX_WALK_RIGHT + " unindexed siblings", startingBuffer
41+ .getPageAddress(), level, 0);
42 key.clear();
43 oldBuffer = buffer;
44 return startingBuffer;

Subscribers

People subscribed via source and target branches