[
https://issues.apache.org/jira/browse/HDFS-9079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14971412#comment-14971412
]
Zhe Zhang commented on HDFS-9079:
---------------------------------
Thanks Nicholas for the comment.
bq. > ... => 2) Asks NN for new GS => 3) Gets new GS from NN => ...
bq. What is the difference between #2 and #3? Is it just a single RPC?
Yes it's a single RPC. I listed them as 2 steps because other events could
happen between #2 and #3. E.g. while {{streamer_i}} is waiting for NN response
{{streamer_j}} might start step #2.
bq. Do you mean that client may update GS without letting NN knowing it?
More details of the proposed protocol can be found [here |
https://issues.apache.org/jira/browse/HDFS-9040?focusedCommentId=14741972&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14741972].
When {{streamer_i}} encounters a DN failure, the coordinator will ask other
streamers to update their DN to increment GS. After all healthy DNs acknowledge
that they have bumped their local GSes, the coordinator send {{updatePipeline}}
RPC to NN to update the NN's copy of GS. So there will never be "false stale"
-- fresh replica being considered as stale.
bq. How to save step #1?
Good catch, I meant saving steps 2~3.
> Erasure coding: preallocate multiple generation stamps and serialize updates
> from data streamers
> ------------------------------------------------------------------------------------------------
>
> Key: HDFS-9079
> URL: https://issues.apache.org/jira/browse/HDFS-9079
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: erasure-coding
> Affects Versions: HDFS-7285
> Reporter: Zhe Zhang
> Assignee: Zhe Zhang
> Attachments: HDFS-9079-HDFS-7285.00.patch, HDFS-9079.01.patch,
> HDFS-9079.02.patch, HDFS-9079.03.patch, HDFS-9079.04.patch, HDFS-9079.05.patch
>
>
> A non-striped DataStreamer goes through the following steps in error handling:
> {code}
> 1) Finds error => 2) Asks NN for new GS => 3) Gets new GS from NN => 4)
> Applies new GS to DN (createBlockOutputStream) => 5) Ack from DN => 6)
> Updates block on NN
> {code}
> To simplify the above we can preallocate GS when NN creates a new striped
> block group ({{FSN#createNewBlock}}). For each new striped block group we can
> reserve {{NUM_PARITY_BLOCKS}} GS's. Then steps 1~3 in the above sequence can
> be saved. If more than {{NUM_PARITY_BLOCKS}} errors have happened we
> shouldn't try to further recover anyway.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)