IndividualBlockLock.announceBlockDoesNotExist should not use global blockId variable
@@ -45,9 +45,9 @@ protected void acquire(TransactionLocks locks) throws IOException {
readBlock(blockId, inodeId);
}
- private void announceBlockDoesNotExist() throws TransactionContextException {
+ private void announceBlockDoesNotExist(long blkId, long inodeId) throws TransactionContextException {
EntityManager.snapshotMaintenance
- (HdfsTransactionContextMaintenanceCmds.BlockDoesNotExist, blockId, inodeId);
+ (HdfsTransactionContextMaintenanceCmds.BlockDoesNotExist, blkId, inodeId);
}
protected void announceEmptyFile(long inodeFileId) throws TransactionContextException {
@@ -64,7 +64,7 @@ protected void readBlock(long blkId, long inodeId)
if (result != null) {
blocks.add(result);
} else {
- announceBlockDoesNotExist();
+ announceBlockDoesNotExist(blkId, inodeId);
}
}
}
