[ 
https://issues.apache.org/jira/browse/HDFS-16214?focusedWorklogId=708570&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-708570
 ]

ASF GitHub Bot logged work on HDFS-16214:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 13/Jan/22 18:32
            Start Date: 13/Jan/22 18:32
    Worklog Time Spent: 10m 
      Work Description: hadoop-yetus commented on pull request #3885:
URL: https://github.com/apache/hadoop/pull/3885#issuecomment-1012400849


   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |:----:|----------:|--------:|:--------:|:-------:|
   | +0 :ok: |  reexec  |   1m  6s |  |  Docker mode activated.  |
   |||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files 
found.  |
   | +0 :ok: |  codespell  |   0m  1s |  |  codespell was not available.  |
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain 
any @author tags.  |
   | -1 :x: |  test4tests  |   0m  0s |  |  The patch doesn't appear to include 
any new or modified tests. Please justify why no new tests are needed for this 
patch. Also please list what manual steps were performed to verify this patch.  
|
   |||| _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  38m 18s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |   1m 43s |  |  trunk passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  compile  |   1m 32s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  checkstyle  |   1m  2s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   1m 40s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   1m 11s |  |  trunk passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 39s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   4m  1s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  27m 26s |  |  branch has no errors 
when building and testing our client artifacts.  |
   |||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   1m 29s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   1m 33s |  |  the patch passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javac  |   1m 33s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   1m 22s |  |  the patch passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  javac  |   1m 22s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | +1 :green_heart: |  checkstyle  |   0m 57s |  |  the patch passed  |
   | +1 :green_heart: |  mvnsite  |   1m 29s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   0m 59s |  |  the patch passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 33s |  |  the patch passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   4m  5s |  |  the patch passed  |
   | -1 :x: |  shadedclient  |  26m 44s |  |  patch has errors when building 
and testing our client artifacts.  |
   |||| _ Other Tests _ |
   | -1 :x: |  unit  | 396m  9s | 
[/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3885/1/artifact/out/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt)
 |  hadoop-hdfs in the patch passed.  |
   | +1 :green_heart: |  asflicense  |   0m 58s |  |  The patch does not 
generate ASF License warnings.  |
   |  |   | 513m 25s |  |  |
   
   
   | Reason | Tests |
   |-------:|:------|
   | Failed junit tests | hadoop.hdfs.TestDFSShell |
   |   | hadoop.hdfs.TestFileCreation |
   |   | hadoop.fs.viewfs.TestViewFileSystemAtHdfsRoot |
   |   | hadoop.hdfs.TestHDFSTrash |
   |   | hadoop.hdfs.server.namenode.TestCheckpoint |
   |   | hadoop.hdfs.server.namenode.TestDeleteRace |
   |   | hadoop.hdfs.TestDistributedFileSystem |
   |   | hadoop.hdfs.TestListFilesInDFS |
   |   | hadoop.fs.viewfs.TestViewFileSystemLinkMergeSlash |
   |   | hadoop.fs.viewfs.TestViewFileSystemLinkFallback |
   |   | hadoop.fs.contract.hdfs.TestHDFSContractDelete |
   |   | hadoop.hdfs.server.namenode.snapshot.TestSnapshot |
   |   | hadoop.fs.viewfs.TestViewFSOverloadSchemeWithMountTableConfigInHDFS |
   |   | hadoop.hdfs.TestViewDistributedFileSystem |
   |   | hadoop.fs.contract.hdfs.TestHDFSContractRootDirectory |
   |   | hadoop.hdfs.TestDFSPermission |
   |   | hadoop.fs.viewfs.TestViewFsWithAcls |
   |   | hadoop.fs.contract.hdfs.TestHDFSContractRename |
   |   | hadoop.hdfs.server.namenode.TestFSDirectory |
   |   | hadoop.hdfs.TestListFilesInFileContext |
   |   | hadoop.fs.TestSymlinkHdfsFileSystem |
   |   | hadoop.fs.viewfs.TestViewFsAtHdfsRoot |
   |   | hadoop.fs.contract.hdfs.TestHDFSContractGetFileStatus |
   |   | hadoop.hdfs.server.namenode.TestProtectedDirectories |
   |   | hadoop.hdfs.TestQuota |
   |   | hadoop.hdfs.server.namenode.TestNNThroughputBenchmark |
   |   | hadoop.fs.TestSymlinkHdfsFileContext |
   |   | hadoop.fs.viewfs.TestViewFileSystemOverloadSchemeWithHdfsScheme |
   |   | hadoop.hdfs.tools.TestViewFSStoragePolicyCommands |
   |   | hadoop.fs.viewfs.TestViewFsWithXAttrs |
   |   | hadoop.fs.TestGlobPaths |
   |   | hadoop.fs.viewfs.TestViewFileSystemWithTruncate |
   |   | hadoop.fs.viewfs.TestViewFileSystemWithAcls |
   |   | hadoop.hdfs.server.balancer.TestBalancer |
   |   | hadoop.hdfs.TestHDFSFileSystemContract |
   |   | hadoop.hdfs.TestViewDistributedFileSystemContract |
   |   | hadoop.hdfs.TestViewDistributedFileSystemWithMountLinks |
   |   | hadoop.fs.TestHDFSFileContextMainOperations |
   |   | hadoop.fs.viewfs.TestViewFsHdfs |
   |   | hadoop.hdfs.server.namenode.TestNestedEncryptionZones |
   |   | hadoop.hdfs.server.namenode.TestAuditLoggerWithCommands |
   |   | hadoop.hdfs.TestAclsEndToEnd |
   |   | hadoop.fs.viewfs.TestViewFileSystemHdfs |
   |   | hadoop.hdfs.server.namenode.TestNamenodeRetryCache |
   |   | hadoop.fs.viewfs.TestViewFileSystemWithXAttrs |
   |   | 
hadoop.fs.viewfs.TestViewFileSystemOverloadSchemeHdfsFileSystemContract |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3885/1/artifact/out/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hadoop/pull/3885 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall 
mvnsite unit shadedclient spotbugs checkstyle codespell |
   | uname | Linux d18e14931ebb 4.15.0-163-generic #171-Ubuntu SMP Fri Nov 5 
11:55:11 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | trunk / 0d0b152bf9a26b5187efa9c087feeeb835c45741 |
   | Default Java | Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
   | Multi-JDK versions | 
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04 
/usr/lib/jvm/java-8-openjdk-amd64:Private 
Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
   |  Test Results | 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3885/1/testReport/ |
   | Max. process+thread count | 2002 (vs. ulimit of 5500) |
   | 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-3885/1/console |
   | versions | git=2.25.1 maven=3.6.3 spotbugs=4.2.2 |
   | Powered by | Apache Yetus 0.14.0-SNAPSHOT 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-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 708570)
    Time Spent: 20m  (was: 10m)

> Lock optimization for large deleteing, no locks on the collection block
> -----------------------------------------------------------------------
>
>                 Key: HDFS-16214
>                 URL: https://issues.apache.org/jira/browse/HDFS-16214
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: namenode
>    Affects Versions: 3.4.0
>            Reporter: Xiangyi Zhu
>            Assignee: Xiangyi Zhu
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> The time-consuming deletion is mainly reflected in three logics , collecting 
> blocks, deleting Inode from InodeMap, and deleting blocks. The current 
> deletion is divided into two major steps. Step 1 acquires the lock, collects 
> the block and inode, deletes the inode, and releases the lock. Step 2 Acquire 
> the lock and delete the block to release the lock.
> Phase 2 is currently deleting blocks in batches, which can control the lock 
> holding time. Here we can also delete blocks asynchronously.
> Now step 1 still has the problem of holding the lock for a long time.
> For stage 1, we can make the collection block not hold the lock. The process 
> is as follows, step 1 obtains the lock, parent.removeChild, writes to 
> editLog, releases the lock. Step 2 no lock, collects the block. Step 3 
> acquire lock, update quota, release lease, release lock. Step 4 acquire lock, 
> delete Inode from InodeMap, release lock. Step 5 acquire lock, delete block 
> to release lock.
> There may be some problems following the above process:
> 1. When the /a/b/c file is open, then delete the /a/b directory. If the 
> deletion is performed to the collecting block stage, the client writes 
> complete or addBlock to the /a/b/c file at this time. This step is not locked 
> and delete /a/b and editLog has been written successfully. In this case, the 
> order of editLog is delete /a/c and complete /a/b/c. In this case, the 
> standby node playback editLog /a/b/c file has been deleted, and then go to 
> complete /a/b/c file will be abnormal.
> 2. If a delete operation is executed to the stage of collecting block, then 
> the administrator executes saveNameSpace, and then restarts Namenode. This 
> situation may cause the Inode that has been deleted from the parent childList 
> to remain in the InodeMap.
> To solve the above problem, in step 1, add the inode being deleted to the 
> Set. When there is a file WriteFileOp (logAllocateBlockId/logCloseFile 
> EditLog), check whether there is this file and one of its parent Inodes in 
> the Set, and throw it if there is. An exception FileNotFoundException 
> occurred.
> In addition, the execution of saveNamespace needs to wait for all iNodes in 
> Set to be removed before execution.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to