From: <tho...@us...> - 2014-03-16 10:55:04
|
Revision: 7983 http://sourceforge.net/p/bigdata/code/7983 Author: thompsonbry Date: 2014-03-16 10:55:01 +0000 (Sun, 16 Mar 2014) Log Message: ----------- Modified DumpJournal to track the #of errors when dumping the pages of an index and continue (unless interrupted or cancelled). See #855 (AssertionError: Child does not have persistent identity) Modified Paths: -------------- branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/btree/AbstractBTree.java branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/btree/PageStats.java Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/btree/AbstractBTree.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/btree/AbstractBTree.java 2014-03-15 14:00:37 UTC (rev 7982) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/btree/AbstractBTree.java 2014-03-16 10:55:01 UTC (rev 7983) @@ -86,6 +86,7 @@ import com.bigdata.resources.OverflowManager; import com.bigdata.service.DataService; import com.bigdata.service.Split; +import com.bigdata.util.InnerCause; import com.bigdata.util.concurrent.Computable; import com.bigdata.util.concurrent.Memoizer; @@ -1537,11 +1538,29 @@ for (int i = 0; i <= nkeys; i++) { - // normal read following the node hierarchy, using cache, etc. - final AbstractNode<?> child = ((Node) node).getChild(i); + try { + + // normal read following the node hierarchy, using cache, etc. + final AbstractNode<?> child = ((Node) node).getChild(i); - // recursive dump - dumpPages(ndx, child, stats); + // recursive dump + dumpPages(ndx, child, stats); + + } catch (Throwable t) { + + if (InnerCause.isInnerCause(t, InterruptedException.class) + || InnerCause.isInnerCause(t, + InterruptedException.class)) { + throw new RuntimeException(t); + } + /* + * Log the error and track the #of errors, but keep scanning + * the index. + */ + stats.nerrors++; + log.error("Error reading child[i=" + i + "]: " + t, t); + continue; + } } Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/btree/PageStats.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/btree/PageStats.java 2014-03-15 14:00:37 UTC (rev 7982) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/btree/PageStats.java 2014-03-16 10:55:01 UTC (rev 7983) @@ -54,6 +54,8 @@ * {@link #SLOT_SIZES}. */ public long blobs; + /** The #of errors encountered during traversal. */ + public long nerrors; /** * This map is used to report the histogram of pages based on the actual * byte count of the user data in the allocation when the backing slot size @@ -126,6 +128,7 @@ sb.append(",maxLeafBytes=" + maxLeafBytes); sb.append(",bytesPerNode=" + getBytesPerNode()); sb.append(",bytesPerLeaf=" + getBytesPerLeaf()); + sb.append(",nerros=" + nerrors); final long npages = (nleaves + nnodes); for (int i = 0; i < SLOT_SIZES.length; i++) { final long slotsThisSize = histogram[i]; @@ -174,6 +177,8 @@ sb.append('\t'); sb.append("nentries"); sb.append('\t'); + sb.append("nerrors"); + sb.append('\t'); sb.append("nodeBytes"); sb.append('\t'); sb.append("leafBytes"); @@ -241,6 +246,8 @@ sb.append('\t'); sb.append(stats.ntuples); sb.append('\t'); + sb.append(stats.nerrors); + sb.append('\t'); sb.append(stats.nodeBytes); sb.append('\t'); sb.append(stats.leafBytes); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |