Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Not A Problem
-
None
-
None
-
None
Description
In method getBlockRecoveryCommand, we have below codes:
else { rBlock = new RecoveringBlock(primaryBlock, recoveryInfos, uc.getBlockRecoveryId()); if (b.isStriped()) { rBlock = new RecoveringStripedBlock(rBlock, uc.getBlockIndicesForSpecifiedStorages(storageIdx), ((BlockInfoStriped) b).getErasureCodingPolicy()); }
It seems that we initialize RecoveringBlock object every time even though b.isStriped returns true.
This is unnecessary.