HDFS-8930. Block report lease may leak if the 2nd full block report comes when NN is still in safemode (Colin P. McCabe via Jing Zhao)
This commit is contained in:
parent
feaf034994
commit
b5ce87f84d
@ -1201,6 +1201,9 @@ Release 2.8.0 - UNRELEASED
|
|||||||
HDFS-8942. Update hyperlink to rack awareness page in HDFS Architecture
|
HDFS-8942. Update hyperlink to rack awareness page in HDFS Architecture
|
||||||
documentation. (Masatake Iwasaki via aajisaka)
|
documentation. (Masatake Iwasaki via aajisaka)
|
||||||
|
|
||||||
|
HDFS-8930. Block report lease may leak if the 2nd full block report comes
|
||||||
|
when NN is still in safemode (Colin P. McCabe via Jing Zhao)
|
||||||
|
|
||||||
Release 2.7.2 - UNRELEASED
|
Release 2.7.2 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -1849,6 +1849,7 @@ public boolean processReport(final DatanodeID nodeID,
|
|||||||
blockLog.info("BLOCK* processReport: "
|
blockLog.info("BLOCK* processReport: "
|
||||||
+ "discarded non-initial block report from {}"
|
+ "discarded non-initial block report from {}"
|
||||||
+ " because namenode still in startup phase", nodeID);
|
+ " because namenode still in startup phase", nodeID);
|
||||||
|
blockReportLeaseManager.removeLease(node);
|
||||||
return !node.hasStaleStorages();
|
return !node.hasStaleStorages();
|
||||||
}
|
}
|
||||||
if (context != null) {
|
if (context != null) {
|
||||||
|
@ -29,7 +29,6 @@
|
|||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.hdfs.MiniDFSCluster;
|
import org.apache.hadoop.hdfs.MiniDFSCluster;
|
||||||
import org.apache.hadoop.hdfs.protocol.DatanodeID;
|
import org.apache.hadoop.hdfs.protocol.DatanodeID;
|
||||||
import org.apache.hadoop.hdfs.server.datanode.DataNode;
|
|
||||||
import org.apache.hadoop.hdfs.server.protocol.BlockReportContext;
|
import org.apache.hadoop.hdfs.server.protocol.BlockReportContext;
|
||||||
import org.apache.hadoop.test.GenericTestUtils;
|
import org.apache.hadoop.test.GenericTestUtils;
|
||||||
import org.apache.log4j.Level;
|
import org.apache.log4j.Level;
|
||||||
@ -40,7 +39,6 @@
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
|
||||||
import java.util.concurrent.Semaphore;
|
import java.util.concurrent.Semaphore;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.atomic.AtomicReference;
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
|
Loading…
Reference in New Issue
Block a user