Fix StorageCallPreventedException in NameNodeRpcServer.commitBlockSynchronization

Description

```
io.hops.exception.StorageCallPreventedException: [ByBlockIdSidAndINodeId] Trying to access storage while it is disable in transaction, inconsistent transaction context statement. Params=[59600083, 360, 202200340]

at io.hops.transaction.context.EntityContext.aboutToAccessStorage(EntityContext.java:242)

at io.hops.transaction.context.InvalidatedBlockContext.findByPrimaryKey(InvalidatedBlockContext.java:143)

at io.hops.transaction.context.InvalidatedBlockContext.find(InvalidatedBlockContext.java:70)

at io.hops.transaction.context.InvalidatedBlockContext.find(InvalidatedBlockContext.java:34)

at io.hops.transaction.context.TransactionContext.find(TransactionContext.java:139)

at io.hops.transaction.EntityManager.find(EntityManager.java:98)

at org.apache.hadoop.hdfs.server.blockmanagement.InvalidateBlocks.findBlock(InvalidateBlocks.java:328)

at org.apache.hadoop.hdfs.server.blockmanagement.InvalidateBlocks.add(InvalidateBlocks.java:274)

at org.apache.hadoop.hdfs.server.blockmanagement.InvalidateBlocks.add(InvalidateBlocks.java:135)

at org.apache.hadoop.hdfs.server.blockmanagement.BlockManager.addToInvalidates(BlockManager.java:1409)

at org.apache.hadoop.hdfs.server.blockmanagement.BlockManager.chooseExcessReplicates(BlockManager.java:3871)

at org.apache.hadoop.hdfs.server.blockmanagement.BlockManager.processOverReplicatedBlock(BlockManager.java:3793)

at org.apache.hadoop.hdfs.server.blockmanagement.BlockManager.checkReplication(BlockManager.java:4751)

at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.finalizeINodeFileUnderConstructionInternal(FSNamesystem.java:4337)

at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.finalizeINodeFileUnderConstruction(FSNamesystem.java:4316)

at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.closeFileCommitBlocks(FSNamesystem.java:4520)

at org.apache.hadoop.hdfs.server.namenode.FSNamesystem$27.performTask(FSNamesystem.java:4480)

at io.hops.transaction.handler.TransactionalRequestHandler.execute(TransactionalRequestHandler.java:99)

at io.hops.transaction.handler.HopsTransactionalRequestHandler.execute(HopsTransactionalRequestHandler.java:50)

at io.hops.transaction.handler.RequestHandler.handle(RequestHandler.java:65)

at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.commitBlockSynchronization(FSNamesystem.java:4499)

at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.commitBlockSynchronization(NameNodeRpcServer.java:662)

at org.apache.hadoop.hdfs.protocolPB.DatanodeProtocolServerSideTranslatorPB.commitBlockSynchronization(DatanodeProtocolServerSideTranslatorPB.java:277)

at org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos$DatanodeProtocolService$2.callBlockingMethod(DatanodeProtocolProtos.java:31797)

at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:447)

at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:996)

at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:850)

at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:793)

at java.security.AccessController.doPrivileged(Native Method)

at javax.security.auth.Subject.doAs(Subject.java:422)

at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1955)

at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2775)```

Status

Assignee

Salman Niazi

Reporter

Salman Niazi

Labels

None

Fix versions

Priority

Medium