[ https://issues.apache.org/jira/browse/HBASE-20001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16374217#comment-16374217 ]
Chia-Ping Tsai commented on HBASE-20001: ---------------------------------------- Is there a chance that null server is passed to RegionStates? {code:java} if(server != null) { useZK = ConfigUtil.useZKForAssignment(server.getConfiguration()); }{code} Why we always remove the daughter region directories when using the ZooKeeper based region assignments? It seems to me that it is another kind of data lose? {code:java} if (regionPair == null || useZK) { regionOffline(hri); // If we use ZK, then we can cleanup entries from meta, since we roll back. if (regionPair != null) { MetaTableAccessor.deleteRegion(this.server.getConnection(), hri); } LOG.debug("Cleaning up HDFS since no meta entry exists, hri: " + hri); FSUtils.deleteRegionDir(server.getConfiguration(), hri); }{code} > cleanIfNoMetaEntry() uses encoded instead of region name to lookup region > ------------------------------------------------------------------------- > > Key: HBASE-20001 > URL: https://issues.apache.org/jira/browse/HBASE-20001 > Project: HBase > Issue Type: Bug > Affects Versions: 1.2.0, 1.3.0, 1.4.0, 1.1.7 > Reporter: Francis Liu > Assignee: Thiruvel Thirumoolan > Priority: Major > Fix For: 1.3.2, 1.5.0, 1.2.7, 1.4.3 > > Attachments: HBASE-20001.branch-1.4.001.patch, > HBASE-20001.branch-1.4.002.patch, HBASE-20001.branch-1.4.003.patch, > HBASE-20001.branch-1.4.004.patch, HBASE-20001.branch-1.4.005.patch > > > In RegionStates.cleanIfNoMetaEntry() > {{if (MetaTableAccessor.getRegion(server.getConnection(), > hri.getEncodedNameAsBytes()) == null) {}} > {{regionOffline(hri);}} > {{FSUtils.deleteRegionDir(server.getConfiguration(), hri);}} > } > But api expects regionname > {{public static Pair<HRegionInfo, ServerName> getRegion(Connection > connection, byte [] regionName)}} > So we might end up cleaning good regions. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)