[
https://issues.apache.org/jira/browse/HDFS-5249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13775755#comment-13775755
]
Jing Zhao commented on HDFS-5249:
---------------------------------
Patch looks pretty good. One comment is that for the dumper thread, we can put
the try-catch under the while loop:
{code}
while (activeState && enabledDump) {
try {
if (nonSequentialWriteInMemory.get() >= DUMP_WRITE_WATER_MARK) {
dump();
}
synchronized (OpenFileCtx.this) {
if (nonSequentialWriteInMemory.get() < DUMP_WRITE_WATER_MARK) {
try {
OpenFileCtx.this.wait();
} catch (InterruptedException e) {
}
}
}
} catch (Throwable t) {
// print and process
}
}
{code}
> Fix dumper thread which may die silently
> ----------------------------------------
>
> Key: HDFS-5249
> URL: https://issues.apache.org/jira/browse/HDFS-5249
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: nfs
> Reporter: Brandon Li
> Assignee: Brandon Li
> Attachments: HDFS-5249.patch
>
>
> Dumper thread can get an NPE when the WriteCtx it's about to work on is just
> deleted by write back thread.
> A dead dumper thread could cause out-of-memory error when too many pending
> writes accumulated for one opened file.
--
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