hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colin Patrick McCabe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-5676) fix inconsistent synchronization of CachingStrategy
Date Wed, 18 Dec 2013 02:43:07 GMT

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

Colin Patrick McCabe commented on HDFS-5676:

The issue is more that in createBlockOutputStream, there is no synchronized block, so there's
no obvious place to put a new one.  But there was an atomic boolean, so this seemed like the
obvious pattern to follow.  Anyway, I can make it synchronized.

> fix inconsistent synchronization of CachingStrategy
> ---------------------------------------------------
>                 Key: HDFS-5676
>                 URL: https://issues.apache.org/jira/browse/HDFS-5676
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: hdfs-client
>    Affects Versions: 2.4.0
>            Reporter: Colin Patrick McCabe
>            Assignee: Colin Patrick McCabe
>            Priority: Minor
>         Attachments: HDFS-5676.001.patch
> Currently, the synchronization for {{CachingStrategy}} is a little inconsistent.  DFSOutputStream#setDropBehind
modifies the strategy object, but there's nothing protecting that object against concurrent
use in {{createBlockOutputStream}}.  Similarly, {{DFSInputStream#setDropBehind}} is synchronized,
but not all the uses of {{cachingStrategy}} are.

This message was sent by Atlassian JIRA

View raw message