HBASE-2244 META gets inconsistent in a number of crash scenarios

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@918325 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2010-03-03 04:50:08 +00:00
parent 8cdba28df5
commit 061118d787
1 changed files with 4 additions and 5 deletions

View File

@ -342,9 +342,8 @@ abstract class BaseScanner extends Chore implements HConstants {
if (!references) return references; if (!references) return references;
if (!verifyDaughterRowPresent(rowContent, qualifier, srvr, metaRegionName, if (!verifyDaughterRowPresent(rowContent, qualifier, srvr, metaRegionName,
hri, parent)) { hri, parent)) {
// If we got here, we added a daughter region to metatable. Update // If we got here, then the parent row does not yet have the
// parent row that daughter has been verified present so we don't check // "daughter row verified present" marker present. Add it.
// for it by doing a get each time through here.
addDaughterRowChecked(metaRegionName, srvr, parent.getRegionName(), hri, addDaughterRowChecked(metaRegionName, srvr, parent.getRegionName(), hri,
qualifier); qualifier);
} }
@ -360,8 +359,8 @@ abstract class BaseScanner extends Chore implements HConstants {
* @param metaRegionName * @param metaRegionName
* @param daughterHRI * @param daughterHRI
* @throws IOException * @throws IOException
* @return True, if the daughter row is present in meta. If false, this * @return True, if parent row has marker for "daughter row verified present"
* method just added it to meta. * else, false (and will do fixup adding daughter if daughter not present).
*/ */
private boolean verifyDaughterRowPresent(final Result rowContent, private boolean verifyDaughterRowPresent(final Result rowContent,
final byte [] daughter, final HRegionInterface srvr, final byte [] daughter, final HRegionInterface srvr,