[
https://issues.apache.org/jira/browse/HDFS-6783?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Colin Patrick McCabe updated HDFS-6783:
---------------------------------------
Attachment: HDFS-6783.005.patch
This patch avoids setting {{curScanCount}} until we hold both the FSN and CRM
locks. This will avoid doing any unnecessary scans under the current locking
regime, and continue to work if we change it later to release the lock inside
{{CRM#rescan}}.
Separately, this also fixes an issue where we were checking {{CRM#shutdown}}
inside the rescan function without holding the CRM lock.
> Fix HDFS CacheReplicationMonitor rescan logic
> ---------------------------------------------
>
> Key: HDFS-6783
> URL: https://issues.apache.org/jira/browse/HDFS-6783
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: caching
> Affects Versions: 3.0.0
> Reporter: Yi Liu
> Assignee: Yi Liu
> Attachments: HDFS-6783.001.patch, HDFS-6783.002.patch,
> HDFS-6783.003.patch, HDFS-6783.004.patch, HDFS-6783.005.patch
>
>
> In monitor thread, needsRescan is set to false before real scan starts, so
> for {{waitForRescanIfNeeded}} will return for the first condition:
> {code}
> if (!needsRescan) {
> return;
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)