You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Walter Su (JIRA)" <ji...@apache.org> on 2015/11/30 07:36:11 UTC

[jira] [Commented] (HDFS-9098) Erasure coding: emulate race conditions among striped streamers in write pipeline

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

Walter Su commented on HDFS-9098:
---------------------------------

The difficulty is thread orderings. Ideally we only expect a few orderings. But we have to take care of all possible orderings. It's hard to emulate the ordering without adding some code in production code.
With sync_point, we can test one specific ordering. "Clean Code" Chapter 13 provides an alternative. The idea is to inject jiggle_point, to increase the odds of different orderings which we don't expect. I think, it's simpler than sync_point?

We can have 2 implementations of DFSClientSyncPointInjector. One for testing. One for production which does nothing.

> Erasure coding: emulate race conditions among striped streamers in write pipeline
> ---------------------------------------------------------------------------------
>
>                 Key: HDFS-9098
>                 URL: https://issues.apache.org/jira/browse/HDFS-9098
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: erasure-coding
>    Affects Versions: 3.0.0
>            Reporter: Zhe Zhang
>            Assignee: Zhe Zhang
>         Attachments: HDFS-9098.00.patch, HDFS-9098.wip.patch
>
>
> Apparently the interleaving of events among {{StripedDataStreamer}}'s is very tricky to handle. [~walter.k.su] and [~jingzhao] have discussed several race conditions under HDFS-9040.
> Let's use FaultInjector to emulate different combinations of interleaved events.
> In particular, we should consider inject delays in the following places:
> # {{Streamer#endBlock}}
> # {{Streamer#locateFollowingBlock}}
> # {{Streamer#updateBlockForPipeline}}
> # {{Streamer#updatePipeline}}
> # {{OutputStream#writeChunk}}
> # {{OutputStream#close}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)