hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gabor Bota (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-13330) ShortCircuitCache#fetchOrCreate never retries
Date Thu, 05 Apr 2018 09:57:00 GMT

     [ https://issues.apache.org/jira/browse/HDFS-13330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gabor Bota updated HDFS-13330:
------------------------------
    Status: Patch Available  (was: Open)

> ShortCircuitCache#fetchOrCreate never retries
> ---------------------------------------------
>
>                 Key: HDFS-13330
>                 URL: https://issues.apache.org/jira/browse/HDFS-13330
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Wei-Chiu Chuang
>            Assignee: Gabor Bota
>            Priority: Major
>         Attachments: HDFS-13330.001.patch, HDFS-13330.002.patch, HDFS-13330.004.patch,
HDFS-13330.005.patch
>
>
> The follow do .. while(false) loop seems useless to me. The code intended to retry but
it never worked. Let's fix it.
> {code:java:title=ShortCircuitCache#fetchOrCreate}
> ShortCircuitReplicaInfo info = null;
> do {
>   if (closed) {
>     LOG.trace("{}: can't fethchOrCreate {} because the cache is closed.",
>         this, key);
>     return null;
>   }
>   Waitable<ShortCircuitReplicaInfo> waitable = replicaInfoMap.get(key);
>   if (waitable != null) {
>     try {
>       info = fetch(key, waitable);
>     } catch (RetriableException e) {
>       LOG.debug("{}: retrying {}", this, e.getMessage());
>     }
>   }
> } while (false);{code}



--
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