HDFS-14494. Move Server logging of StatedId inside receiveRequestState(). Contributed by Shweta Yakkali.
Signed-off-by: Wei-Chiu Chuang <weichiu@apache.org>
This commit is contained in:
parent
9a9edfa87e
commit
3186afa24c
|
@ -124,9 +124,11 @@ class GlobalStateIdContext implements AlignmentContext {
|
||||||
@Override
|
@Override
|
||||||
public long receiveRequestState(RpcRequestHeaderProto header,
|
public long receiveRequestState(RpcRequestHeaderProto header,
|
||||||
long clientWaitTime) throws RetriableException {
|
long clientWaitTime) throws RetriableException {
|
||||||
long serverStateId =
|
long serverStateId = getLastSeenStateId();
|
||||||
namesystem.getFSImage().getCorrectLastAppliedOrWrittenTxId();
|
|
||||||
long clientStateId = header.getStateId();
|
long clientStateId = header.getStateId();
|
||||||
|
FSNamesystem.LOG.trace("Client State ID= {} and Server State ID= {}",
|
||||||
|
clientStateId, serverStateId);
|
||||||
|
|
||||||
if (clientStateId > serverStateId &&
|
if (clientStateId > serverStateId &&
|
||||||
HAServiceState.ACTIVE.equals(namesystem.getState())) {
|
HAServiceState.ACTIVE.equals(namesystem.getState())) {
|
||||||
FSNamesystem.LOG.warn("A client sent stateId: " + clientStateId +
|
FSNamesystem.LOG.warn("A client sent stateId: " + clientStateId +
|
||||||
|
|
Loading…
Reference in New Issue