Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ZanderXu
Copy link
Contributor

Description of PR

In our prod environment, 8020 Handler of Observer NameNode also blocked by EditlogTailer.

And EditlogTailer cost a long time for selecting InputStreams from Journalnode with holding the FSNLock.

During this period, 8020 handlers of Observer NameNode will be blocked by the FSN Lock.

In theory, selecting inputstreams from JournalNode does not involve changing memory information in NameNode, so we can move the selecting out of the FSN Lock, and it can improve the throughput of Observer NameNode.

After reading the relevant code in depth, I found that it is feasible to move the selecting inputStream out of the FSNLock.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 1m 4s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ 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 💚 mvninstall 40m 57s trunk passed
+1 💚 compile 1m 43s trunk passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚 compile 1m 32s trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 checkstyle 1m 20s trunk passed
+1 💚 mvnsite 1m 41s trunk passed
+1 💚 javadoc 1m 19s trunk passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚 javadoc 1m 41s trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 spotbugs 3m 48s trunk passed
+1 💚 shadedclient 25m 41s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 1m 24s the patch passed
+1 💚 compile 1m 29s the patch passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚 javac 1m 29s the patch passed
+1 💚 compile 1m 19s the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 javac 1m 19s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 1m 0s the patch passed
+1 💚 mvnsite 1m 29s the patch passed
+1 💚 javadoc 0m 58s the patch passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚 javadoc 1m 28s the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 spotbugs 3m 31s the patch passed
+1 💚 shadedclient 25m 46s patch has no errors when building and testing our client artifacts.
_ Other Tests _
-1 ❌ unit 408m 16s /patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt hadoop-hdfs in the patch passed.
+1 💚 asflicense 1m 3s The patch does not generate ASF License warnings.
526m 2s
Reason Tests
Failed junit tests hadoop.hdfs.server.diskbalancer.command.TestDiskBalancerCommand
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4497/1/artifact/out/Dockerfile
GITHUB PR #4497
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux 30718586a920 4.15.0-175-generic #184-Ubuntu SMP Thu Mar 24 17:48:36 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 9ce6b2ae5a7c8f4dabe15bf6559ef8f3b2f43a3d
Default Java Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1 /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-4497/1/testReport/
Max. process+thread count 2080 (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-4497/1/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@jojochuang jojochuang changed the title HDFS-16642. Moving the selecting inputstream from journalnode in EditLogTailer out of FSNLock HDFS-16642. [SBN read] Moving the selecting inputstream from journalnode in EditLogTailer out of FSNLock Jun 29, 2022
@jojochuang
Copy link
Contributor

Looks thread-safe to me. Has this patch been tested in a production environment?

@ZanderXu
Copy link
Contributor Author

Looks thread-safe to me. Has this patch been tested in a production environment?

@jojochuang Thanks for your review and sorry sorry for replaying so late. We have release it in our prod environment and it works well.

After checking some jstacks of ObserverNamenodes, I found that there are no handlers blocked at Selecting EditInputStreams, so the performance should be improved.

@ferhui can you help me review this patch?

@ferhui
Copy link
Contributor

ferhui commented Aug 3, 2022

It looks good. The failed case TestDiskBalancerCommand seems unrelated to changes. @ZanderXu could you confirm?

@ZanderXu
Copy link
Contributor Author

ZanderXu commented Aug 3, 2022

@ferhui Sir, thank you very much for your helping me to review this patch.

The failed case TestDiskBalancerCommand seems unrelated to changes.

TestDiskBalancerCommand is unrelated to the change and it works well locally.

@ferhui
Copy link
Contributor

ferhui commented Aug 3, 2022

The PR has hung there for 10 days. @ZanderXu could you please push an empty commit to trigger CI? We can avoid potential conflicts and merge it after CI runs.

@ZanderXu
Copy link
Contributor Author

ZanderXu commented Aug 3, 2022

Copy, sir. I will rebase it on the latest the trunk.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 1m 0s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ 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 💚 mvninstall 41m 29s trunk passed
+1 💚 compile 1m 40s trunk passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚 compile 1m 31s trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 checkstyle 1m 18s trunk passed
+1 💚 mvnsite 1m 41s trunk passed
+1 💚 javadoc 1m 19s trunk passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚 javadoc 1m 40s trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 spotbugs 3m 47s trunk passed
+1 💚 shadedclient 25m 57s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 1m 24s the patch passed
+1 💚 compile 1m 28s the patch passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚 javac 1m 28s the patch passed
+1 💚 compile 1m 19s the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 javac 1m 19s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 1m 1s the patch passed
+1 💚 mvnsite 1m 27s the patch passed
+1 💚 javadoc 0m 59s the patch passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚 javadoc 1m 28s the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 spotbugs 3m 34s the patch passed
+1 💚 shadedclient 26m 1s patch has no errors when building and testing our client artifacts.
_ Other Tests _
-1 ❌ unit 384m 58s /patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt hadoop-hdfs in the patch passed.
+1 💚 asflicense 1m 2s The patch does not generate ASF License warnings.
503m 43s
Reason Tests
Failed junit tests hadoop.hdfs.TestWriteConfigurationToDFS
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4497/2/artifact/out/Dockerfile
GITHUB PR #4497
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux 78691ded6233 4.15.0-175-generic #184-Ubuntu SMP Thu Mar 24 17:48:36 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 99a3e2f
Default Java Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1 /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-4497/2/testReport/
Max. process+thread count 1926 (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-4497/2/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@ZanderXu
Copy link
Contributor Author

ZanderXu commented Aug 4, 2022

emm... hadoop.hdfs.TestWriteConfigurationToDFS works well locally, I don't know why it fails in CI.

cc @ferhui

@ferhui
Copy link
Contributor

ferhui commented Aug 4, 2022

@ZanderXu It is unrelated to this PR. can create a ticket to track it.

@ferhui ferhui merged commit 8eebf40 into apache:trunk Aug 4, 2022
@ferhui
Copy link
Contributor

ferhui commented Aug 4, 2022

@ZanderXu Thanks for your contribution. @jojochuang Thanks for your review! Merged

@ZanderXu
Copy link
Contributor Author

ZanderXu commented Aug 4, 2022

@jojochuang @ferhui Sir, thank you very much for helping review.

HarshitGupta11 pushed a commit to HarshitGupta11/hadoop that referenced this pull request Nov 28, 2022
NyteKnight pushed a commit to NyteKnight/hadoop that referenced this pull request Jun 25, 2024
…itioning to Active with in-progress tailer (apache#194)

* HDFS-16642. Moving the selecting inputstream from journalnode in EditLogTailer outof FSNLock (apache#4497)

* HDFS-16689. Standby NameNode crashes when transitioning to Active with in-progress tailer (apache#4744)

* remove annotation introduced in merge wrongly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants