HBASE-2077 NullPointerException with an open scanner that expired causing
an immediate region server shutdown (Sam Pullara via JD) git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@894553 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6802181855
commit
58039a7bc2
|
@ -142,6 +142,8 @@ Release 0.21.0 - Unreleased
|
||||||
HBASE-2026 NPE in StoreScanner on compaction
|
HBASE-2026 NPE in StoreScanner on compaction
|
||||||
HBASE-2072 fs.automatic.close isn't passed to FileSystem
|
HBASE-2072 fs.automatic.close isn't passed to FileSystem
|
||||||
HBASE-2075 Master requires HDFS superuser privileges due to waitOnSafeMode
|
HBASE-2075 Master requires HDFS superuser privileges due to waitOnSafeMode
|
||||||
|
HBASE-2077 NullPointerException with an open scanner that expired causing
|
||||||
|
an immediate region server shutdown (Sam Pullara via JD)
|
||||||
|
|
||||||
IMPROVEMENTS
|
IMPROVEMENTS
|
||||||
HBASE-1760 Cleanup TODOs in HTable
|
HBASE-1760 Cleanup TODOs in HTable
|
||||||
|
|
|
@ -183,11 +183,13 @@ public class Leases extends Thread {
|
||||||
public void renewLease(final String leaseName) throws LeaseException {
|
public void renewLease(final String leaseName) throws LeaseException {
|
||||||
synchronized (leaseQueue) {
|
synchronized (leaseQueue) {
|
||||||
Lease lease = leases.get(leaseName);
|
Lease lease = leases.get(leaseName);
|
||||||
if (lease == null) {
|
// We need to check to see if the remove is successful as the poll in the run()
|
||||||
|
// method could have completed between the get and the remove which will result
|
||||||
|
// in a corrupt leaseQueue.
|
||||||
|
if (lease == null || !leaseQueue.remove(lease)) {
|
||||||
throw new LeaseException("lease '" + leaseName +
|
throw new LeaseException("lease '" + leaseName +
|
||||||
"' does not exist");
|
"' does not exist or has already expired");
|
||||||
}
|
}
|
||||||
leaseQueue.remove(lease);
|
|
||||||
lease.setExpirationTime(System.currentTimeMillis() + leasePeriod);
|
lease.setExpirationTime(System.currentTimeMillis() + leasePeriod);
|
||||||
leaseQueue.add(lease);
|
leaseQueue.add(lease);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue