ZanderXu opened a new pull request, #4872:
URL: https://github.com/apache/hadoop/pull/4872
### Description of PR
ObserverNameNode currently can handle the addBlockLocation RPC, but it may
throw a FileNotFoundException when it contains stale txid.
- AddBlock is not a coordinated method, so Observer will not check the
statId.
- AddBlock does the validation with checkOperation(OperationCategory.READ)
So the observer namenode can handle the addBlock rpc, and it will throw a
FileNotFoundException during doing validation when this observer cannot replay
the edit of create file.
The related code as follows:
```
checkOperation(OperationCategory.READ);
final FSPermissionChecker pc = getPermissionChecker();
FSPermissionChecker.setOperationType(operationName);
readLock();
try {
checkOperation(OperationCategory.READ);
r = FSDirWriteFileOp.validateAddBlock(this, pc, src, fileId, clientName,
previous, onRetryBlock);
} finally {
readUnlock(operationName);
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]