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
fcfe7a3cc0
commit
d6d95d2686
@ -2676,8 +2676,6 @@ private void processRpcRequest(RpcRequestHeaderProto header,
|
|||||||
stateId = alignmentContext.receiveRequestState(
|
stateId = alignmentContext.receiveRequestState(
|
||||||
header, getMaxIdleTime());
|
header, getMaxIdleTime());
|
||||||
call.setClientStateId(stateId);
|
call.setClientStateId(stateId);
|
||||||
LOG.trace("Client State ID= {} and Server State ID= {}",
|
|
||||||
call.getClientStateId(), alignmentContext.getLastSeenStateId());
|
|
||||||
}
|
}
|
||||||
} catch (IOException ioe) {
|
} catch (IOException ioe) {
|
||||||
throw new RpcServerException("Processing RPC request caught ", ioe);
|
throw new RpcServerException("Processing RPC request caught ", ioe);
|
||||||
|
@ -124,9 +124,11 @@ public void updateRequestState(RpcRequestHeaderProto.Builder header) {
|
|||||||
@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("The client stateId: {} is greater than "
|
FSNamesystem.LOG.warn("The client stateId: {} is greater than "
|
||||||
|
Loading…
Reference in New Issue
Block a user