[
https://issues.apache.org/jira/browse/HDFS-4979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13712053#comment-13712053
]
Chris Nauroth commented on HDFS-4979:
-------------------------------------
# In reference to this code for synchronization on the cache entry:
{code}
synchronized (mapEntry) {
while (mapEntry.state == CacheEntry.INPROGRESS) {
try {
this.wait();
} catch (InterruptedException ie) {
LOG.warn("Caught " + ie);
}
}
{code}
{code}
public synchronized void completed(boolean success) {
state = success ? SUCCESS : FAILED;
this.notify();
}
{code}
Imagine there are multiple retries of the same call in flight. Then, it's
possible that multiple RPC handler threads enter {{wait}} on the {{mapEntry}}.
However, completion triggers {{notify}}, which only wakes up a single waiting
thread. The remaining unlucky threads that weren't selected by {{notify}}
would block indefinitely. I think we need to change this to {{notifyAll}}.
# It looks like there is still an unneeded {{AtomicBoolean}} in
{{appendFileInt}}.
> Implement retry cache on the namenode
> -------------------------------------
>
> Key: HDFS-4979
> URL: https://issues.apache.org/jira/browse/HDFS-4979
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: namenode
> Reporter: Suresh Srinivas
> Assignee: Suresh Srinivas
> Attachments: HDFS-4979.1.patch, HDFS-4979.2.patch, HDFS-4979.3.patch,
> HDFS-4979.4.patch, HDFS-4979.5.patch, HDFS-4979.patch
>
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira