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 "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/03/05 05:50:00 UTC
[jira] [Work logged] (HDFS-15875) Check whether file is being
truncated before truncate
[ https://issues.apache.org/jira/browse/HDFS-15875?focusedWorklogId=561297&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-561297 ]
ASF GitHub Bot logged work on HDFS-15875:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 05/Mar/21 05:49
Start Date: 05/Mar/21 05:49
Worklog Time Spent: 10m
Work Description: ferhui opened a new pull request #2746:
URL: https://github.com/apache/hadoop/pull/2746
## NOTICE
Please create an issue in ASF JIRA before opening a pull request,
and you need to set the title of the pull request which starts with
the corresponding JIRA issue number. (e.g. HADOOP-XXXXX. Fix a typo in YYY.)
For more details, please see https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Issue Time Tracking
-------------------
Worklog Id: (was: 561297)
Remaining Estimate: 0h
Time Spent: 10m
> Check whether file is being truncated before truncate
> -----------------------------------------------------
>
> Key: HDFS-15875
> URL: https://issues.apache.org/jira/browse/HDFS-15875
> Project: Hadoop HDFS
> Issue Type: Bug
> Affects Versions: 3.3.0, 3.1.4, 3.2.2
> Reporter: Hui Fei
> Assignee: Hui Fei
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> We have got this problem.
> * A job sends truncate to namenode, and the block recovery goes.
> * DataNode D is timeout while it connects another datanode (60s), so block recovery costs 60+s
> * A job tails, and B job starts and it sends truncate to namenode. New recoveryId generates during recovery lease.
> * DataNode D commitBlockSynchronization and get errors "does not match current recovery id"
> So truncate will not complete forever. Datanode D has replica with new length and two other datanodes have replica old length.
> DN has the error messages "Inconsistent size of finalized replicas"
> the related code is in BlockRecoveryWorker.java
> {code}
> for (BlockRecord r : syncList) {
> assert r.rInfo.getNumBytes() > 0 : "zero length replica";
> ReplicaState rState = r.rInfo.getOriginalReplicaState();
> if (rState.getValue() < bestState.getValue()) {
> bestState = rState;
> }
> if(rState == ReplicaState.FINALIZED) {
> if (finalizedLength > 0 && finalizedLength != r.rInfo.getNumBytes()) {
> throw new IOException("Inconsistent size of finalized replicas. " +
> "Replica " + r.rInfo + " expected size: " + finalizedLength);
> }
> finalizedLength = r.rInfo.getNumBytes();
> }
> }
> {code}
>
>
> {code:java}
> {code}
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org