hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Íñigo Goiri (JIRA) <j...@apache.org>
Subject [jira] [Commented] (HDFS-14088) RequestHedgingProxyProvider can throw NullPointerException when failover due to no lock on currentUsedProxy
Date Tue, 04 Dec 2018 17:39:00 GMT

    [ https://issues.apache.org/jira/browse/HDFS-14088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16709021#comment-16709021
] 

Íñigo Goiri commented on HDFS-14088:
------------------------------------

In the unit tests we should use {{LambdaTestUtils#intercept()}} and let the other exceptions
just go.

> RequestHedgingProxyProvider can throw NullPointerException when failover due to no lock
on currentUsedProxy
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-14088
>                 URL: https://issues.apache.org/jira/browse/HDFS-14088
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs-client
>            Reporter: Yuxuan Wang
>            Assignee: Yuxuan Wang
>            Priority: Major
>         Attachments: HDFS-14088.001.patch, HDFS-14088.002.patch, HDFS-14088.003.patch
>
>
> {code:java}
> if (currentUsedProxy != null) {
>         try {
>           Object retVal = method.invoke(currentUsedProxy.proxy, args);
>           LOG.debug("Invocation successful on [{}]",
>               currentUsedProxy.proxyInfo);
> {code}
> If a thread run try block and then other thread trigger a fail over calling method
> {code:java}
> @Override
>   public synchronized void performFailover(T currentProxy) {
>     toIgnore = this.currentUsedProxy.proxyInfo;
>     this.currentUsedProxy = null;
>   }
> {code}
> It will set currentUsedProxy to null, and the first thread can throw a NullPointerException.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message