HDFS-11352. Potential deadlock in NN when failing over. Contributed by Erik Krogen.
This commit is contained in:
parent
b0b3966851
commit
3acc96edbf
|
@ -4768,7 +4768,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|||
@Metric({"TransactionsSinceLastCheckpoint",
|
||||
"Number of transactions since last checkpoint"})
|
||||
public long getTransactionsSinceLastCheckpoint() {
|
||||
return getEditLog().getLastWrittenTxId() -
|
||||
return getEditLog().getLastWrittenTxIdWithoutLock() -
|
||||
getFSImage().getStorage().getMostRecentCheckpointTxId();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue