Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
Reviewed
Description
This comes out of a discussion in HDFS-8763. Pasting jingzhao's comment from the jira:
...whether we need to let NameNode wait for all the block_received msgs to announce the replica is safe. Looking into the code, now we have
- NameNode knows the DataNodes involved when initially setting up the writing pipeline
- If any DataNode fails during the writing, client bumps the GS and finally reports all the DataNodes included in the new pipeline to NameNode through the updatePipeline RPC.
- When the client received the ack for the last packet of the block (and before the client tries to close the file on NameNode), the replica has been finalized in all the DataNodes.
Then in this case, when NameNode receives the close request from the client, the NameNode already knows the latest replicas for the block. Currently the checkReplication call only counts in all the replicas that NN has already received the block_received msg, but based on the above #2 and #3, it may be safe to also count in all the replicas in the BlockUnderConstructionFeature#replicas?
Attachments
Attachments
Issue Links
- is related to
-
HDFS-1172 Blocks in newly completed files are considered under-replicated too quickly
- Resolved
-
HDFS-10810 Setreplication removing block from underconstrcution temporarily when batch IBR is enabled.
- Resolved
-
HDFS-8344 NameNode doesn't recover lease for files with missing blocks
- Patch Available
-
HDFS-9710 Change DN to send block receipt IBRs in batches
- Resolved
-
HDFS-15359 EC: Allow closing a file with committed blocks
- Resolved
- relates to
-
HDFS-15359 EC: Allow closing a file with committed blocks
- Resolved