1. Three DN cluster. For DNs storage type is like this.
DN1 : DISK,ARCHIVE
DN2 : DISK
DN3 : DISK,ARCHIVE (All DNs are in same rack)
2. One file with two replicas (In DN1 and DN2)
3. Set file storage policy COLD
4. Now execute Mover.
Expected Result: File blocks should move in DN1:ARCHIVE and DN3:ARCHIVE
Actual Result: chooseTargetInSameNode() move D1:DISK block to D1:ARCHIVE, but in next iteration chooseTarget() for same rake is selecting again DN1:ARCHIVE for target where already same block exists.
chooseTargetInSameNode() and chooseTarget() should not select the node as target where already same replica exists. The dispatcher will fail to move block as shown in the log below. Then, the Mover will try again in next iteration.