hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1574743 - /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Date Thu, 06 Mar 2014 01:42:33 GMT
Author: tedyu
Date: Thu Mar  6 01:42:32 2014
New Revision: 1574743

URL: http://svn.apache.org/r1574743
Log:
HBASE-10662 RegionScanner is never closed if the region has been moved-out or re-opened when
performing scan request


Modified:
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=1574743&r1=1574742&r2=1574743&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Thu Mar  6 01:42:32 2014
@@ -3235,7 +3235,14 @@ public class HRegionServer implements Cl
       return builder.build();
     } catch (IOException ie) {
       if (scannerName != null && ie instanceof NotServingRegionException) {
-        scanners.remove(scannerName);
+        RegionScannerHolder rsh = scanners.remove(scannerName);
+        if (rsh != null) {
+          try {
+            RegionScanner scanner = rsh.s;
+            scanner.close();
+            leases.cancelLease(scannerName);
+          } catch (IOException e) {}
+        }
       }
       throw new ServiceException(ie);
     }



Mime
View raw message