You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "craffit (via GitHub)" <gi...@apache.org> on 2026/10/02 08:58:18 UTC
[PR] HDFS-17983. Lease recovery rejects an RBW replica with "Block length mismatch" after an interrupted packet write [hadoop]
craffit opened a new pull request, #8777:
URL: https://github.com/apache/hadoop/pull/8777
### Description of PR
JIRA: https://issues.apache.org/jira/browse/HDFS-17983
A packet write that fails after its data reached the block file but before `bytesOnDisk` is updated (e.g. `ClosedByInterruptException` while syncing) leaves an RBW replica whose block file is longer than `bytesOnDisk`. Lease/block recovery then rejects that replica in `checkReplicaFiles` ("Block length mismatch"), even though it holds all acknowledged data.
`FsDatasetImpl#initReplicaRecoveryImpl` now truncates the block and meta file to `bytesOnDisk` in that case, as `recoverRbwImpl` already does for pipeline recovery since HDFS-11472. The existing `bytesOnDisk >= visibleLength` check runs first, so no acknowledged bytes are dropped.
### How was this patch tested?
Added `TestLeaseRecovery#testLeaseRecoveryAfterInterruptedPacketWrite`, which interrupts the DataNode receiver after a packet's data is written so the following fsync fails, and checks that lease recovery closes the file at the acknowledged length.
### For code changes:
- [x] Does the title of this PR start with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
- [ ] Object storage: Have the integration tests been executed and the endpoint declared according to the connector-specific documentation? (N/A)
- [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? (N/A)
- [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, `NOTICE-binary` files? (N/A)
### AI Tooling
If an AI tool was used:
- [x] The PR includes the phrase "Contains content generated by <tool>" where <tool> is the name of the AI tool used.
- [x] My use of AI contributions follows the ASF legal policy https://www.apache.org/legal/generative-tooling.html
Contains content generated by Claude Code.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
Re: [PR] HDFS-17983. Lease recovery rejects an RBW replica with "Block length mismatch" after an interrupted packet write [hadoop]
Posted by "hadoop-yetus (via GitHub)" <gi...@apache.org>.
hadoop-yetus commented on PR #8777:
URL: https://github.com/apache/hadoop/pull/8777#issuecomment-6061528669
:confetti_ball: **+1 overall**
| Vote | Subsystem | Runtime | Logfile | Comment |
|:----:|----------:|--------:|:--------:|:-------:|
| +0 :ok: | reexec | 0m 54s | | Docker mode activated. |
|||| _ Prechecks _ |
| +1 :green_heart: | dupname | 0m 0s | | No case conflicting files found. |
| +0 :ok: | codespell | 0m 0s | | codespell was not available. |
| +0 :ok: | detsecrets | 0m 0s | | detect-secrets was not available. |
| +1 :green_heart: | @author | 0m 0s | | The patch does not contain any @author tags. |
| +1 :green_heart: | test4tests | 0m 0s | | The patch appears to include 1 new or modified test files. |
|||| _ trunk Compile Tests _ |
| +1 :green_heart: | mvninstall | 48m 22s | | trunk passed |
| +1 :green_heart: | compile | 1m 46s | | trunk passed with JDK Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu |
| +1 :green_heart: | compile | 1m 47s | | trunk passed with JDK Ubuntu-17.0.20.1+1-1-24.04-Ubuntu |
| +1 :green_heart: | checkstyle | 1m 49s | | trunk passed |
| +1 :green_heart: | mvnsite | 1m 58s | | trunk passed |
| +1 :green_heart: | javadoc | 1m 29s | | trunk passed with JDK Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu |
| +1 :green_heart: | javadoc | 1m 32s | | trunk passed with JDK Ubuntu-17.0.20.1+1-1-24.04-Ubuntu |
| +1 :green_heart: | spotbugs | 4m 23s | | trunk passed |
| +1 :green_heart: | shadedclient | 37m 35s | | branch has no errors when building and testing our client artifacts. |
|||| _ Patch Compile Tests _ |
| +1 :green_heart: | mvninstall | 1m 24s | | the patch passed |
| +1 :green_heart: | compile | 1m 17s | | the patch passed with JDK Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu |
| +1 :green_heart: | javac | 1m 17s | | the patch passed |
| +1 :green_heart: | compile | 1m 21s | | the patch passed with JDK Ubuntu-17.0.20.1+1-1-24.04-Ubuntu |
| +1 :green_heart: | javac | 1m 21s | | the patch passed |
| +1 :green_heart: | blanks | 0m 0s | | The patch has no blanks issues. |
| +1 :green_heart: | checkstyle | 1m 21s | | the patch passed |
| +1 :green_heart: | mvnsite | 1m 30s | | the patch passed |
| +1 :green_heart: | javadoc | 0m 59s | | the patch passed with JDK Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu |
| +1 :green_heart: | javadoc | 1m 3s | | the patch passed with JDK Ubuntu-17.0.20.1+1-1-24.04-Ubuntu |
| +1 :green_heart: | spotbugs | 4m 8s | | the patch passed |
| +1 :green_heart: | shadedclient | 37m 30s | | patch has no errors when building and testing our client artifacts. |
|||| _ Other Tests _ |
| +1 :green_heart: | unit | 257m 32s | | hadoop-hdfs in the patch passed. |
| +1 :green_heart: | asflicense | 0m 51s | | The patch does not generate ASF License warnings. |
| | | 408m 36s | | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | ClientAPI=1.56 ServerAPI=1.56 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8777/3/artifact/out/Dockerfile |
| GITHUB PR | https://github.com/apache/hadoop/pull/8777 |
| Optional Tests | dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets |
| uname | Linux b4bb9390b156 5.15.0-191-generic #201-Ubuntu SMP Fri Aug 7 18:39:04 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/bin/hadoop.sh |
| git revision | trunk / 3fb3ebd27048a0384c8112599287c74a453094e1 |
| Default Java | Ubuntu-17.0.20.1+1-1-24.04-Ubuntu |
| Multi-JDK versions | /usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.20.1+1-1-24.04-Ubuntu |
| Test Results | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8777/3/testReport/ |
| Max. process+thread count | 2273 (vs. ulimit of 10000) |
| modules | C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs |
| Console output | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8777/3/console |
| versions | git=2.43.0 maven=3.9.15 spotbugs=4.9.7 |
| Powered by | Apache Yetus 0.14.1 https://yetus.apache.org |
This message was automatically generated.
--
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.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
Re: [PR] HDFS-17983. Lease recovery rejects an RBW replica with "Block length mismatch" after an interrupted packet write [hadoop]
Posted by "hadoop-yetus (via GitHub)" <gi...@apache.org>.
hadoop-yetus commented on PR #8777:
URL: https://github.com/apache/hadoop/pull/8777#issuecomment-5955049477
:confetti_ball: **+1 overall**
| Vote | Subsystem | Runtime | Logfile | Comment |
|:----:|----------:|--------:|:--------:|:-------:|
| +0 :ok: | reexec | 0m 36s | | Docker mode activated. |
|||| _ Prechecks _ |
| +1 :green_heart: | dupname | 0m 0s | | No case conflicting files found. |
| +0 :ok: | codespell | 0m 1s | | codespell was not available. |
| +0 :ok: | detsecrets | 0m 1s | | detect-secrets was not available. |
| +1 :green_heart: | @author | 0m 0s | | The patch does not contain any @author tags. |
| +1 :green_heart: | test4tests | 0m 0s | | The patch appears to include 1 new or modified test files. |
|||| _ trunk Compile Tests _ |
| +1 :green_heart: | mvninstall | 43m 10s | | trunk passed |
| +1 :green_heart: | compile | 1m 48s | | trunk passed with JDK Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu |
| +1 :green_heart: | compile | 1m 49s | | trunk passed with JDK Ubuntu-17.0.20.1+1-1-24.04-Ubuntu |
| +1 :green_heart: | checkstyle | 1m 51s | | trunk passed |
| +1 :green_heart: | mvnsite | 1m 57s | | trunk passed |
| +1 :green_heart: | javadoc | 1m 35s | | trunk passed with JDK Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu |
| +1 :green_heart: | javadoc | 1m 33s | | trunk passed with JDK Ubuntu-17.0.20.1+1-1-24.04-Ubuntu |
| +1 :green_heart: | spotbugs | 4m 13s | | trunk passed |
| +1 :green_heart: | shadedclient | 32m 0s | | branch has no errors when building and testing our client artifacts. |
|||| _ Patch Compile Tests _ |
| +1 :green_heart: | mvninstall | 1m 22s | | the patch passed |
| +1 :green_heart: | compile | 1m 18s | | the patch passed with JDK Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu |
| +1 :green_heart: | javac | 1m 18s | | the patch passed |
| +1 :green_heart: | compile | 1m 19s | | the patch passed with JDK Ubuntu-17.0.20.1+1-1-24.04-Ubuntu |
| +1 :green_heart: | javac | 1m 19s | | the patch passed |
| +1 :green_heart: | blanks | 0m 0s | | The patch has no blanks issues. |
| +1 :green_heart: | checkstyle | 1m 19s | | the patch passed |
| +1 :green_heart: | mvnsite | 1m 24s | | the patch passed |
| +1 :green_heart: | javadoc | 1m 1s | | the patch passed with JDK Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu |
| +1 :green_heart: | javadoc | 1m 0s | | the patch passed with JDK Ubuntu-17.0.20.1+1-1-24.04-Ubuntu |
| +1 :green_heart: | spotbugs | 3m 53s | | the patch passed |
| +1 :green_heart: | shadedclient | 31m 21s | | patch has no errors when building and testing our client artifacts. |
|||| _ Other Tests _ |
| +1 :green_heart: | unit | 219m 56s | | hadoop-hdfs in the patch passed. |
| +1 :green_heart: | asflicense | 0m 47s | | The patch does not generate ASF License warnings. |
| | | 353m 23s | | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | ClientAPI=1.56 ServerAPI=1.56 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8777/1/artifact/out/Dockerfile |
| GITHUB PR | https://github.com/apache/hadoop/pull/8777 |
| Optional Tests | dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets |
| uname | Linux 3307f8246ef5 5.15.0-190-generic #200-Ubuntu SMP Fri Aug 7 15:06:04 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/bin/hadoop.sh |
| git revision | trunk / fee7600066e63ed0f96344d8cc10b0af8a5b3467 |
| Default Java | Ubuntu-17.0.20.1+1-1-24.04-Ubuntu |
| Multi-JDK versions | /usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.20.1+1-1-24.04-Ubuntu |
| Test Results | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8777/1/testReport/ |
| Max. process+thread count | 3558 (vs. ulimit of 10000) |
| modules | C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs |
| Console output | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8777/1/console |
| versions | git=2.43.0 maven=3.9.15 spotbugs=4.9.7 |
| Powered by | Apache Yetus 0.14.1 https://yetus.apache.org |
This message was automatically generated.
--
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.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
Re: [PR] HDFS-17983. Lease recovery rejects an RBW replica with "Block length mismatch" after an interrupted packet write [hadoop]
Posted by "craffit (via GitHub)" <gi...@apache.org>.
craffit commented on code in PR #8777:
URL: https://github.com/apache/hadoop/pull/8777#discussion_r4216305099
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java:
##########
@@ -3091,6 +3091,22 @@ static ReplicaRecoveryInfo initReplicaRecoveryImpl(String bpid, ReplicaMap map,
+ replica);
}
+ // A packet write that fails after its data reached the block file but
+ // before bytesOnDisk was updated (e.g. ClosedByInterruptException while
+ // syncing) leaves an unacknowledged tail in the block file. Drop it, as
+ // recoverRbwImpl does for pipeline recovery (HDFS-11472), instead of
+ // failing checkReplicaFiles and excluding the replica from recovery.
+ final long bytesOnDisk = replica.getBytesOnDisk();
+ final long blockDataLength = replica.getBlockDataLength();
+ if (blockDataLength > bytesOnDisk) {
Review Comment:
Done: the truncation is now restricted to ReplicaState.RBW.
--
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.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
Re: [PR] HDFS-17983. Lease recovery rejects an RBW replica with "Block length mismatch" after an interrupted packet write [hadoop]
Posted by "joseluisll (via GitHub)" <gi...@apache.org>.
joseluisll commented on code in PR #8777:
URL: https://github.com/apache/hadoop/pull/8777#discussion_r4211838088
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java:
##########
@@ -3091,6 +3091,22 @@ static ReplicaRecoveryInfo initReplicaRecoveryImpl(String bpid, ReplicaMap map,
+ replica);
}
+ // A packet write that fails after its data reached the block file but
+ // before bytesOnDisk was updated (e.g. ClosedByInterruptException while
+ // syncing) leaves an unacknowledged tail in the block file. Drop it, as
+ // recoverRbwImpl does for pipeline recovery (HDFS-11472), instead of
+ // failing checkReplicaFiles and excluding the replica from recovery.
Review Comment:
Nit: `recoverRbwImpl` doesn't do this. It first raises `bytesOnDisk` to `blockDataLength` and then truncates to `bytesAcked`. Truncating to `bytesOnDisk` is the more conservative choice here, since the tail's checksum may not have reached the meta file. Maybe say that instead.
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java:
##########
@@ -3091,6 +3091,22 @@ static ReplicaRecoveryInfo initReplicaRecoveryImpl(String bpid, ReplicaMap map,
+ replica);
}
+ // A packet write that fails after its data reached the block file but
+ // before bytesOnDisk was updated (e.g. ClosedByInterruptException while
+ // syncing) leaves an unacknowledged tail in the block file. Drop it, as
+ // recoverRbwImpl does for pipeline recovery (HDFS-11472), instead of
+ // failing checkReplicaFiles and excluding the replica from recovery.
+ final long bytesOnDisk = replica.getBytesOnDisk();
+ final long blockDataLength = replica.getBlockDataLength();
+ if (blockDataLength > bytesOnDisk) {
Review Comment:
Nit: this also runs for TEMPORARY replicas, where `getVisibleLength()` returns -1, so the `bytesOnDisk >= visibleLength` guard above doesn't protect anything for them. They're ignored by `BlockRecoveryWorker` anyway, so restricting this to `replica.getState() == ReplicaState.RBW` would keep the safety argument exact at no cost.
--
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.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
Re: [PR] HDFS-17983. Lease recovery rejects an RBW replica with "Block length mismatch" after an interrupted packet write [hadoop]
Posted by "joseluisll (via GitHub)" <gi...@apache.org>.
joseluisll commented on PR #8777:
URL: https://github.com/apache/hadoop/pull/8777#issuecomment-6101441445
@ayushtkn @cnauroth This PR came from the hdfs-dev list together with #8778 . Both are green and need your review.
The short summary: dn-1 discarded its block due a mismatch in disk and
in-memory state (https://issues.apache.org/jira/browse/HDFS-17983), dn-0
reported the block as non-existing during boot, due to a race condition (
https://issues.apache.org/jira/browse/HDFS-17984). dn-1 running the
recovery determined the block was lost.
--
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.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
Re: [PR] HDFS-17983. Lease recovery rejects an RBW replica with "Block length mismatch" after an interrupted packet write [hadoop]
Posted by "hadoop-yetus (via GitHub)" <gi...@apache.org>.
hadoop-yetus commented on PR #8777:
URL: https://github.com/apache/hadoop/pull/8777#issuecomment-5958505745
:confetti_ball: **+1 overall**
| Vote | Subsystem | Runtime | Logfile | Comment |
|:----:|----------:|--------:|:--------:|:-------:|
| +0 :ok: | reexec | 0m 55s | | Docker mode activated. |
|||| _ Prechecks _ |
| +1 :green_heart: | dupname | 0m 0s | | No case conflicting files found. |
| +0 :ok: | codespell | 0m 1s | | codespell was not available. |
| +0 :ok: | detsecrets | 0m 1s | | detect-secrets was not available. |
| +1 :green_heart: | @author | 0m 0s | | The patch does not contain any @author tags. |
| +1 :green_heart: | test4tests | 0m 0s | | The patch appears to include 1 new or modified test files. |
|||| _ trunk Compile Tests _ |
| +1 :green_heart: | mvninstall | 49m 41s | | trunk passed |
| +1 :green_heart: | compile | 1m 51s | | trunk passed with JDK Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu |
| +1 :green_heart: | compile | 1m 53s | | trunk passed with JDK Ubuntu-17.0.20.1+1-1-24.04-Ubuntu |
| +1 :green_heart: | checkstyle | 1m 49s | | trunk passed |
| +1 :green_heart: | mvnsite | 2m 7s | | trunk passed |
| +1 :green_heart: | javadoc | 1m 30s | | trunk passed with JDK Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu |
| +1 :green_heart: | javadoc | 1m 34s | | trunk passed with JDK Ubuntu-17.0.20.1+1-1-24.04-Ubuntu |
| +1 :green_heart: | spotbugs | 4m 20s | | trunk passed |
| +1 :green_heart: | shadedclient | 39m 47s | | branch has no errors when building and testing our client artifacts. |
| -0 :warning: | patch | 40m 24s | | Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary. |
|||| _ Patch Compile Tests _ |
| +1 :green_heart: | mvninstall | 1m 26s | | the patch passed |
| +1 :green_heart: | compile | 1m 22s | | the patch passed with JDK Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu |
| +1 :green_heart: | javac | 1m 22s | | the patch passed |
| +1 :green_heart: | compile | 1m 20s | | the patch passed with JDK Ubuntu-17.0.20.1+1-1-24.04-Ubuntu |
| +1 :green_heart: | javac | 1m 20s | | the patch passed |
| +1 :green_heart: | blanks | 0m 0s | | The patch has no blanks issues. |
| +1 :green_heart: | checkstyle | 1m 19s | | the patch passed |
| +1 :green_heart: | mvnsite | 1m 28s | | the patch passed |
| +1 :green_heart: | javadoc | 1m 2s | | the patch passed with JDK Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu |
| +1 :green_heart: | javadoc | 1m 7s | | the patch passed with JDK Ubuntu-17.0.20.1+1-1-24.04-Ubuntu |
| +1 :green_heart: | spotbugs | 4m 21s | | the patch passed |
| +1 :green_heart: | shadedclient | 37m 31s | | patch has no errors when building and testing our client artifacts. |
|||| _ Other Tests _ |
| +1 :green_heart: | unit | 261m 48s | | hadoop-hdfs in the patch passed. |
| +1 :green_heart: | asflicense | 0m 56s | | The patch does not generate ASF License warnings. |
| | | 417m 16s | | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | ClientAPI=1.56 ServerAPI=1.56 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8777/2/artifact/out/Dockerfile |
| Optional Tests | dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets |
| uname | Linux bf1ee2b07c46 5.15.0-191-generic #201-Ubuntu SMP Fri Aug 7 18:39:04 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/bin/hadoop.sh |
| git revision | trunk / 438a993cb52aa5738d2756f008cd1481f9b21fb0 |
| Default Java | Ubuntu-17.0.20.1+1-1-24.04-Ubuntu |
| Multi-JDK versions | /usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.20.1+1-1-24.04-Ubuntu |
| Test Results | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8777/2/testReport/ |
| Max. process+thread count | 2244 (vs. ulimit of 10000) |
| modules | C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs |
| Console output | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8777/2/console |
| versions | git=2.43.0 maven=3.9.15 spotbugs=4.9.7 |
| Powered by | Apache Yetus 0.14.1 https://yetus.apache.org |
This message was automatically generated.
--
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.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
Re: [PR] HDFS-17983. Lease recovery rejects an RBW replica with "Block length mismatch" after an interrupted packet write [hadoop]
Posted by "joseluisll (via GitHub)" <gi...@apache.org>.
joseluisll commented on code in PR #8777:
URL: https://github.com/apache/hadoop/pull/8777#discussion_r4211722396
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java:
##########
@@ -3091,6 +3091,22 @@ static ReplicaRecoveryInfo initReplicaRecoveryImpl(String bpid, ReplicaMap map,
+ replica);
}
+ // A packet write that fails after its data reached the block file but
+ // before bytesOnDisk was updated (e.g. ClosedByInterruptException while
+ // syncing) leaves an unacknowledged tail in the block file. Drop it, as
+ // recoverRbwImpl does for pipeline recovery (HDFS-11472), instead of
+ // failing checkReplicaFiles and excluding the replica from recovery.
Review Comment:
The comment says this mirrors `recoverRbwImpl`, but that method trusts the file first (it raises `bytesOnDisk` to `blockDataLength`) and only then truncates to `bytesAcked`. A DataNode restart also keeps this tail when its checksums are valid, since the replica length is rebuilt by `validateIntegrityAndSetLength`.
Truncating to `bytesOnDisk` seems like a fine conservative choice, since the tail's checksums may never have reached the meta file. Could the comment say that, instead of citing `recoverRbwImpl`?
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java:
##########
@@ -3091,6 +3091,22 @@ static ReplicaRecoveryInfo initReplicaRecoveryImpl(String bpid, ReplicaMap map,
+ replica);
}
+ // A packet write that fails after its data reached the block file but
+ // before bytesOnDisk was updated (e.g. ClosedByInterruptException while
+ // syncing) leaves an unacknowledged tail in the block file. Drop it, as
+ // recoverRbwImpl does for pipeline recovery (HDFS-11472), instead of
+ // failing checkReplicaFiles and excluding the replica from recovery.
+ final long bytesOnDisk = replica.getBytesOnDisk();
+ final long blockDataLength = replica.getBlockDataLength();
+ if (blockDataLength > bytesOnDisk) {
Review Comment:
Minor: the truncation runs before the generation-stamp and recovery-id checks below. Harmless in practice, since a replica that fails them is stale anyway, but moving it (together with `checkReplicaFiles`) next to the RUR conversion would keep the on-disk change on the path that succeeds.
##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecovery.java:
##########
@@ -242,6 +249,79 @@ public void testBlockRecoveryWithLessMetafile() throws Exception {
assertEquals(newFileLen, expectedNewFileLen);
}
+ /**
+ * A packet write that fails after its data reached the block file but
+ * before bytesOnDisk was updated leaves an RBW replica whose block file is
+ * longer than bytesOnDisk. Lease recovery must drop the unacknowledged tail
+ * and recover the replica instead of rejecting it with
+ * "Block length mismatch".
+ */
+ @Test
+ @Timeout(120)
+ public void testLeaseRecoveryAfterInterruptedPacketWrite() throws Exception {
+ Configuration conf = new HdfsConfiguration();
+ // A failed block recovery is only retried after 30 heartbeat intervals,
+ // well after this test stops waiting for the lease to be recovered.
+ conf.setLong(DFSConfigKeys.DFS_HEARTBEAT_INTERVAL_KEY, 1);
Review Comment:
As far as I can tell, a retry wouldn't succeed anyway, because the mismatch is held in DataNode memory, and with the default 3s heartbeat the retry would come at 90s, also past the 15s wait. The 1s heartbeat seems to be about getting the recovery command delivered quickly. Could the comment say that?
Also, without the fix the test fails with a bare `TimeoutException`; a message on the `waitFor` would make that failure easier to read.
##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecovery.java:
##########
@@ -242,6 +249,79 @@ public void testBlockRecoveryWithLessMetafile() throws Exception {
assertEquals(newFileLen, expectedNewFileLen);
}
+ /**
+ * A packet write that fails after its data reached the block file but
+ * before bytesOnDisk was updated leaves an RBW replica whose block file is
+ * longer than bytesOnDisk. Lease recovery must drop the unacknowledged tail
+ * and recover the replica instead of rejecting it with
+ * "Block length mismatch".
+ */
+ @Test
+ @Timeout(120)
+ public void testLeaseRecoveryAfterInterruptedPacketWrite() throws Exception {
Review Comment:
This end-to-end test depends on `delayWriteToDisk` staying between `writeDataToDisk` and `flushOrSync` (the `assertFalse` and block-length assertions guard that, which is nice). Would a direct `initReplicaRecovery` test be worth adding as well, in the style of `TestInterDatanodeProtocol#testUpdateReplicaUnderRecovery`? It could cover an RBW replica with extra bytes in the block file, with and without matching checksums in the meta file, and the `bytesOnDisk == 0` case (first packet interrupted), where the replica is truncated to 0 and recovery deletes the block.
##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecovery.java:
##########
@@ -242,6 +249,79 @@ public void testBlockRecoveryWithLessMetafile() throws Exception {
assertEquals(newFileLen, expectedNewFileLen);
}
+ /**
+ * A packet write that fails after its data reached the block file but
+ * before bytesOnDisk was updated leaves an RBW replica whose block file is
+ * longer than bytesOnDisk. Lease recovery must drop the unacknowledged tail
+ * and recover the replica instead of rejecting it with
+ * "Block length mismatch".
+ */
+ @Test
+ @Timeout(120)
+ public void testLeaseRecoveryAfterInterruptedPacketWrite() throws Exception {
+ Configuration conf = new HdfsConfiguration();
+ // A failed block recovery is only retried after 30 heartbeat intervals,
+ // well after this test stops waiting for the lease to be recovered.
+ conf.setLong(DFSConfigKeys.DFS_HEARTBEAT_INTERVAL_KEY, 1);
+ cluster = new MiniDFSCluster.Builder(conf).numDataNodes(1).build();
+ cluster.waitActive();
+ DistributedFileSystem dfs = cluster.getFileSystem();
+ Path file = new Path("/testLeaseRecoveryAfterInterruptedPacketWrite");
+ byte[] acked = AppendTestUtil.randomBytes(0xFEEDL, 4096);
+ byte[] unacked = AppendTestUtil.randomBytes(0xBEEFL, 1024);
+
+ FSDataOutputStream out = dfs.create(file, (short) 1);
+ out.write(acked);
+ out.hsync();
+
+ AtomicBoolean interruptNextWrite = new AtomicBoolean(true);
+ DataNodeFaultInjector oldInjector = DataNodeFaultInjector.get();
+ DataNodeFaultInjector.set(new DataNodeFaultInjector() {
+ @Override
+ public void delayWriteToDisk() {
+ // The packet data is in the block file. Interrupt the receiver, as the
+ // PacketResponder does on an ack failure, so the following fsync fails
+ // with ClosedByInterruptException before bytesOnDisk is updated.
+ if (interruptNextWrite.getAndSet(false)) {
+ Thread.currentThread().interrupt();
+ }
+ }
+ });
+ try {
+ out.write(unacked);
+ out.hsync();
+ fail("hsync should fail after the interrupted packet write");
+ } catch (IOException expected) {
+ // the only datanode in the pipeline failed the write
+ } finally {
+ DataNodeFaultInjector.set(oldInjector);
+ }
+ assertFalse(interruptNextWrite.get(), "packet write was not interrupted");
+ ((DFSOutputStream) out.getWrappedStream()).abort();
+
+ ExtendedBlock block = cluster.getNameNodeRpc()
+ .getBlockLocations(file.toString(), 0, Long.MAX_VALUE).get(0)
+ .getBlock();
+ ReplicaInfo rbw = FsDatasetTestUtil.fetchReplicaInfo(
+ DataNodeTestUtils.getFSDataset(cluster.getDataNodes().get(0)),
+ block.getBlockPoolId(), block.getBlockId());
+ assertEquals(acked.length, rbw.getBytesOnDisk());
+ assertEquals(acked.length + unacked.length, rbw.getBlockDataLength(),
+ "block file should contain the unacknowledged packet");
+
+ DistributedFileSystem newDfs = (DistributedFileSystem) FileSystem
+ .newInstance(cluster.getConfiguration(0));
+ GenericTestUtils.waitFor(() -> {
+ try {
+ return newDfs.recoverLease(file);
+ } catch (IOException e) {
+ return false;
+ }
+ }, 500, 15000);
+ assertEquals(acked.length, newDfs.getFileStatus(file).getLen());
+ assertArrayEquals(acked, DFSTestUtil.readFileAsBytes(newDfs, file));
Review Comment:
Could you also assert on the DataNode side after recovery, e.g. that the replica is FINALIZED and its block file length equals `acked.length`? That would check the truncation directly rather than only through the client read.
--
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.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
Re: [PR] HDFS-17983. Lease recovery rejects an RBW replica with "Block length mismatch" after an interrupted packet write [hadoop]
Posted by "joseluisll (via GitHub)" <gi...@apache.org>.
joseluisll commented on code in PR #8777:
URL: https://github.com/apache/hadoop/pull/8777#discussion_r4211722405
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java:
##########
@@ -3091,6 +3091,22 @@ static ReplicaRecoveryInfo initReplicaRecoveryImpl(String bpid, ReplicaMap map,
+ replica);
}
+ // A packet write that fails after its data reached the block file but
+ // before bytesOnDisk was updated (e.g. ClosedByInterruptException while
+ // syncing) leaves an unacknowledged tail in the block file. Drop it, as
+ // recoverRbwImpl does for pipeline recovery (HDFS-11472), instead of
+ // failing checkReplicaFiles and excluding the replica from recovery.
+ final long bytesOnDisk = replica.getBytesOnDisk();
+ final long blockDataLength = replica.getBlockDataLength();
+ if (blockDataLength > bytesOnDisk) {
Review Comment:
Minor: the truncation runs before the generation-stamp and recovery-id checks below. Harmless in practice, since a replica that fails them is stale anyway, but moving it (together with `checkReplicaFiles`) next to the RUR conversion would keep the on-disk change on the path that succeeds.
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java:
##########
@@ -3091,6 +3091,22 @@ static ReplicaRecoveryInfo initReplicaRecoveryImpl(String bpid, ReplicaMap map,
+ replica);
}
+ // A packet write that fails after its data reached the block file but
+ // before bytesOnDisk was updated (e.g. ClosedByInterruptException while
+ // syncing) leaves an unacknowledged tail in the block file. Drop it, as
+ // recoverRbwImpl does for pipeline recovery (HDFS-11472), instead of
+ // failing checkReplicaFiles and excluding the replica from recovery.
Review Comment:
The comment says this mirrors `recoverRbwImpl`, but that method trusts the file first (it raises `bytesOnDisk` to `blockDataLength`) and only then truncates to `bytesAcked`. A DataNode restart also keeps this tail when its checksums are valid, since the replica length is rebuilt by `validateIntegrityAndSetLength`.
Truncating to `bytesOnDisk` seems like a fine conservative choice, since the tail's checksums may never have reached the meta file. Could the comment say that, instead of citing `recoverRbwImpl`?
--
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.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
Re: [PR] HDFS-17983. Lease recovery rejects an RBW replica with "Block length mismatch" after an interrupted packet write [hadoop]
Posted by "craffit (via GitHub)" <gi...@apache.org>.
craffit commented on PR #8777:
URL: https://github.com/apache/hadoop/pull/8777#issuecomment-6055136690
@joseluisll Thanks you for the the review.
I found part of your comments were removed from github somehow (but were in JIRA), i went ahead and addressed them anyway, if you think its too much, I'm happy to only address the comment on TEMPORARY replicas (https://github.com/apache/hadoop/pull/8777#discussion_r4211838079).
I implemented all your suggestions except I didn't add a direct initReplicaRecovery unit test. Happy to add one if you think it's worth it. Summarizing:
- the truncation now only applies to RBW replicas
- the comment no longer cites recoverRbwImpl and explains why truncating to bytesOnDisk is the conservative choice
- the truncation and checkReplicaFiles now run after the generation-stamp and recovery-id checks
- the test explains the 1s heartbeat correctly, has a failure message on waitFor, and checks on the DataNode that the replica is FINALIZED at the acknowledged length
Let me know what other steps I can do to make this land, also happy to provide backports.
--
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.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
Re: [PR] HDFS-17983. Lease recovery rejects an RBW replica with "Block length mismatch" after an interrupted packet write [hadoop]
Posted by "joseluisll (via GitHub)" <gi...@apache.org>.
joseluisll commented on code in PR #8777:
URL: https://github.com/apache/hadoop/pull/8777#discussion_r4211722437
##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecovery.java:
##########
@@ -242,6 +249,79 @@ public void testBlockRecoveryWithLessMetafile() throws Exception {
assertEquals(newFileLen, expectedNewFileLen);
}
+ /**
+ * A packet write that fails after its data reached the block file but
+ * before bytesOnDisk was updated leaves an RBW replica whose block file is
+ * longer than bytesOnDisk. Lease recovery must drop the unacknowledged tail
+ * and recover the replica instead of rejecting it with
+ * "Block length mismatch".
+ */
+ @Test
+ @Timeout(120)
+ public void testLeaseRecoveryAfterInterruptedPacketWrite() throws Exception {
Review Comment:
This end-to-end test depends on `delayWriteToDisk` staying between `writeDataToDisk` and `flushOrSync` (the `assertFalse` and block-length assertions guard that, which is nice). Would a direct `initReplicaRecovery` test be worth adding as well, in the style of `TestInterDatanodeProtocol#testUpdateReplicaUnderRecovery`? It could cover an RBW replica with extra bytes in the block file, with and without matching checksums in the meta file, and the `bytesOnDisk == 0` case (first packet interrupted), where the replica is truncated to 0 and recovery deletes the block.
##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecovery.java:
##########
@@ -242,6 +249,79 @@ public void testBlockRecoveryWithLessMetafile() throws Exception {
assertEquals(newFileLen, expectedNewFileLen);
}
+ /**
+ * A packet write that fails after its data reached the block file but
+ * before bytesOnDisk was updated leaves an RBW replica whose block file is
+ * longer than bytesOnDisk. Lease recovery must drop the unacknowledged tail
+ * and recover the replica instead of rejecting it with
+ * "Block length mismatch".
+ */
+ @Test
+ @Timeout(120)
+ public void testLeaseRecoveryAfterInterruptedPacketWrite() throws Exception {
+ Configuration conf = new HdfsConfiguration();
+ // A failed block recovery is only retried after 30 heartbeat intervals,
+ // well after this test stops waiting for the lease to be recovered.
+ conf.setLong(DFSConfigKeys.DFS_HEARTBEAT_INTERVAL_KEY, 1);
+ cluster = new MiniDFSCluster.Builder(conf).numDataNodes(1).build();
+ cluster.waitActive();
+ DistributedFileSystem dfs = cluster.getFileSystem();
+ Path file = new Path("/testLeaseRecoveryAfterInterruptedPacketWrite");
+ byte[] acked = AppendTestUtil.randomBytes(0xFEEDL, 4096);
+ byte[] unacked = AppendTestUtil.randomBytes(0xBEEFL, 1024);
+
+ FSDataOutputStream out = dfs.create(file, (short) 1);
+ out.write(acked);
+ out.hsync();
+
+ AtomicBoolean interruptNextWrite = new AtomicBoolean(true);
+ DataNodeFaultInjector oldInjector = DataNodeFaultInjector.get();
+ DataNodeFaultInjector.set(new DataNodeFaultInjector() {
+ @Override
+ public void delayWriteToDisk() {
+ // The packet data is in the block file. Interrupt the receiver, as the
+ // PacketResponder does on an ack failure, so the following fsync fails
+ // with ClosedByInterruptException before bytesOnDisk is updated.
+ if (interruptNextWrite.getAndSet(false)) {
+ Thread.currentThread().interrupt();
+ }
+ }
+ });
+ try {
+ out.write(unacked);
+ out.hsync();
+ fail("hsync should fail after the interrupted packet write");
+ } catch (IOException expected) {
+ // the only datanode in the pipeline failed the write
+ } finally {
+ DataNodeFaultInjector.set(oldInjector);
+ }
+ assertFalse(interruptNextWrite.get(), "packet write was not interrupted");
+ ((DFSOutputStream) out.getWrappedStream()).abort();
+
+ ExtendedBlock block = cluster.getNameNodeRpc()
+ .getBlockLocations(file.toString(), 0, Long.MAX_VALUE).get(0)
+ .getBlock();
+ ReplicaInfo rbw = FsDatasetTestUtil.fetchReplicaInfo(
+ DataNodeTestUtils.getFSDataset(cluster.getDataNodes().get(0)),
+ block.getBlockPoolId(), block.getBlockId());
+ assertEquals(acked.length, rbw.getBytesOnDisk());
+ assertEquals(acked.length + unacked.length, rbw.getBlockDataLength(),
+ "block file should contain the unacknowledged packet");
+
+ DistributedFileSystem newDfs = (DistributedFileSystem) FileSystem
+ .newInstance(cluster.getConfiguration(0));
+ GenericTestUtils.waitFor(() -> {
+ try {
+ return newDfs.recoverLease(file);
+ } catch (IOException e) {
+ return false;
+ }
+ }, 500, 15000);
+ assertEquals(acked.length, newDfs.getFileStatus(file).getLen());
+ assertArrayEquals(acked, DFSTestUtil.readFileAsBytes(newDfs, file));
Review Comment:
Could you also assert on the DataNode side after recovery, e.g. that the replica is FINALIZED and its block file length equals `acked.length`? That would check the truncation directly rather than only through the client read.
##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecovery.java:
##########
@@ -242,6 +249,79 @@ public void testBlockRecoveryWithLessMetafile() throws Exception {
assertEquals(newFileLen, expectedNewFileLen);
}
+ /**
+ * A packet write that fails after its data reached the block file but
+ * before bytesOnDisk was updated leaves an RBW replica whose block file is
+ * longer than bytesOnDisk. Lease recovery must drop the unacknowledged tail
+ * and recover the replica instead of rejecting it with
+ * "Block length mismatch".
+ */
+ @Test
+ @Timeout(120)
+ public void testLeaseRecoveryAfterInterruptedPacketWrite() throws Exception {
+ Configuration conf = new HdfsConfiguration();
+ // A failed block recovery is only retried after 30 heartbeat intervals,
+ // well after this test stops waiting for the lease to be recovered.
+ conf.setLong(DFSConfigKeys.DFS_HEARTBEAT_INTERVAL_KEY, 1);
Review Comment:
As far as I can tell, a retry wouldn't succeed anyway, because the mismatch is held in DataNode memory, and with the default 3s heartbeat the retry would come at 90s, also past the 15s wait. The 1s heartbeat seems to be about getting the recovery command delivered quickly. Could the comment say that?
Also, without the fix the test fails with a bare `TimeoutException`; a message on the `waitFor` would make that failure easier to read.
--
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.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
Re: [PR] HDFS-17983. Lease recovery rejects an RBW replica with "Block length mismatch" after an interrupted packet write [hadoop]
Posted by "joseluisll (via GitHub)" <gi...@apache.org>.
joseluisll commented on code in PR #8777:
URL: https://github.com/apache/hadoop/pull/8777#discussion_r4211838088
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java:
##########
@@ -3091,6 +3091,22 @@ static ReplicaRecoveryInfo initReplicaRecoveryImpl(String bpid, ReplicaMap map,
+ replica);
}
+ // A packet write that fails after its data reached the block file but
+ // before bytesOnDisk was updated (e.g. ClosedByInterruptException while
+ // syncing) leaves an unacknowledged tail in the block file. Drop it, as
+ // recoverRbwImpl does for pipeline recovery (HDFS-11472), instead of
+ // failing checkReplicaFiles and excluding the replica from recovery.
Review Comment:
Nit: `recoverRbwImpl` doesn't do this. It first raises `bytesOnDisk` to `blockDataLength` and then truncates to `bytesAcked`. Truncating to `bytesOnDisk` is the more conservative choice here, since the tail's checksum may not have reached the meta file. Maybe say that instead.
--
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.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org