You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2025/07/24 03:02:00 UTC
[jira] [Commented] (HDFS-17812) BlockIteratorImpl can miss blocks under certain conditions
[ https://issues.apache.org/jira/browse/HDFS-17812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18009434#comment-18009434 ]
ASF GitHub Bot commented on HDFS-17812:
---------------------------------------
kokonguyen191 opened a new pull request, #7826:
URL: https://github.com/apache/hadoop/pull/7826
### Description of PR
1. BlockIteratorImpl#getSubdirEntries sorts by strings, meaning subdir29 comes before subdir4, which can result in a bigger block id being listed before a smaller block id
2. If block cleanup happens before state.curEntry is reset to null, stale data can carry over into the next loop
3. Search for a bigger ID than the range in nextSorted(entries, state.curEntry) -> null -> subdir is skipped.
Usually happens during DiskBalancer operations.
### How was this patch tested?
UT
> BlockIteratorImpl can miss blocks under certain conditions
> ----------------------------------------------------------
>
> Key: HDFS-17812
> URL: https://issues.apache.org/jira/browse/HDFS-17812
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: Felix N
> Assignee: Felix N
> Priority: Minor
>
> # BlockIteratorImpl#getSubdirEntries sorts by strings, meaning subdir20 comes before subdir4, which can result in a bigger block id being listed before a smaller block id
> # If block cleanup happens before state.curEntry is reset to null, stale data can carry over into the next loop
> # Search for a bigger ID than the range in nextSorted(entries, state.curEntry) -> null -> subdir is skipped.
> Usually happens during DiskBalancer operations.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org