Jackson-Wang-7 opened a new pull request #3880:
URL: https://github.com/apache/hadoop/pull/3880
…y striped blocks.
<!--
Thanks for sending a pull request!
1. If this is your first time, please read our contributor guidelines:
https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute
2. Make sure your PR title starts with JIRA issue id, e.g.,
'HADOOP-17799. Your PR title ...'.
-->
### Description of PR
if there are two or more blocks exist in a same rack, it may cause unique
data block is added to exactlyOne processing list when choosing redundancy
stripted block to delete.
`storages.remove(cur);
if (storages.isEmpty()) {
rackMap.remove(rack);
}
if (moreThanOne.remove(cur)) {
if (storages.size() == 1) {
**final DatanodeStorageInfo remaining = storages.get(0);
moreThanOne.remove(remaining);
exactlyOne.add(remaining);**
}
} else {
exactlyOne.remove(cur);
}`
In this case, moreThanOne list may not contain the remaining block. The
remaining block shouldn’t be deleted, but it is added to exactlyOne list. And
then it will be deleted.
### How was this patch tested?
The testcase is that:(EC 6+3)
blk_-xxx009 in rack /d1/r1
blo_-xxx008 in rack /d1/r1
blo_-xxx008 in rack /d1/r2
blo_-xxx008 in rack /d1/r3
blk_-xxx007 in rack /d1/r4
blo_-xxx006 in rack /d2/r1
blk_-xxx005 in rack /d2/r2
blo_-xxx004 in rack /d2/r3
blk_-xxx003 in rack /d2/r4
blo_-xxx002 in rack /d2/r5
blk_-xxx001 in rack /d2/r6
After the FBR is triggered and redundant data blocks are added to invalidate
list, blo_-xxx008 in rack /d1/r1 and blo_-xxx008 in rack /d1/r2 need to be
deleted, blk_-xxx009 is HEALTHY.
### For code changes:
- [ ] Does the title or this PR starts with the corresponding JIRA issue id
(e.g. 'HADOOP-17799. Your PR title ...')?
- [ ] Object storage: have the integration tests been executed and the
endpoint declared according to the connector-specific documentation?
- [ ] If adding new dependencies to the code, are these dependencies
licensed in a way that is compatible for inclusion under [ASF
2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`,
`NOTICE-binary` files?
--
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]