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 "Kihwal Lee (JIRA)" <ji...@apache.org> on 2012/11/14 03:32:13 UTC
[jira] [Created] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Kihwal Lee created HDFS-4186:
--------------------------------
Summary: logSync() is called with the write lock held while releasing lease
Key: HDFS-4186
URL: https://issues.apache.org/jira/browse/HDFS-4186
Project: Hadoop HDFS
Issue Type: Bug
Components: name-node
Affects Versions: 2.0.2-alpha, 0.23.4
Reporter: Kihwal Lee
Priority: Critical
As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Posted by "Kihwal Lee (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497082#comment-13497082 ]
Kihwal Lee commented on HDFS-4186:
----------------------------------
It's modtly an optimization. Since several methods are now calling logSync() even if there is nothing to sync,it allows returning early before hitting the edit log lock. There is no correctness problem without it in terms of edit logging, but the metric for batched sync will be inaccurate.
> logSync() is called with the write lock held while releasing lease
> ------------------------------------------------------------------
>
> Key: HDFS-4186
> URL: https://issues.apache.org/jira/browse/HDFS-4186
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.23.4, 2.0.2-alpha
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Priority: Critical
> Attachments: hdfs-4186-trunk.patch
>
>
> As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
> Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Posted by "Kihwal Lee (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kihwal Lee updated HDFS-4186:
-----------------------------
Attachment: (was: hdfs-4186-branch-0.23-inaccurate-batched-sync-count.patch)
> logSync() is called with the write lock held while releasing lease
> ------------------------------------------------------------------
>
> Key: HDFS-4186
> URL: https://issues.apache.org/jira/browse/HDFS-4186
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.23.4, 2.0.2-alpha
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Priority: Critical
> Attachments: hdfs-4186-branch-0.23-inaccurate-batched-sync-count.patch, hdfs-4186-trunk.patch, hdfs-4186-trunk-skip-standbyException.patch
>
>
> As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
> Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Posted by "Kihwal Lee (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kihwal Lee updated HDFS-4186:
-----------------------------
Attachment: (was: hdfs-4186-trunk-inaccurate-batched-sync-count.patch)
> logSync() is called with the write lock held while releasing lease
> ------------------------------------------------------------------
>
> Key: HDFS-4186
> URL: https://issues.apache.org/jira/browse/HDFS-4186
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.23.4, 2.0.2-alpha
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Priority: Critical
> Attachments: hdfs-4186-branch-0.23-inaccurate-batched-sync-count.patch, hdfs-4186-trunk.patch, hdfs-4186-trunk-skip-standbyException.patch
>
>
> As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
> Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13498179#comment-13498179 ]
Todd Lipcon commented on HDFS-4186:
-----------------------------------
+1, looks good. Thanks guys.
> logSync() is called with the write lock held while releasing lease
> ------------------------------------------------------------------
>
> Key: HDFS-4186
> URL: https://issues.apache.org/jira/browse/HDFS-4186
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.23.4, 2.0.2-alpha
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Priority: Critical
> Attachments: hdfs-4186-branch-0.23-inaccurate-batched-sync-count.patch, hdfs-4186-trunk.patch, hdfs-4186-trunk-skip-standbyException.patch
>
>
> As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
> Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13498773#comment-13498773 ]
Hudson commented on HDFS-4186:
------------------------------
Integrated in Hadoop-Hdfs-0.23-Build #437 (See [https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/437/])
HDFS-4186. logSync() is called with the write lock held while releasing lease (Revision 1409994)
Result = SUCCESS
daryn : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1409994
Files :
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/LeaseManager.java
* /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestEditLog.java
> logSync() is called with the write lock held while releasing lease
> ------------------------------------------------------------------
>
> Key: HDFS-4186
> URL: https://issues.apache.org/jira/browse/HDFS-4186
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.23.4, 2.0.2-alpha
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Priority: Critical
> Fix For: 3.0.0, 2.0.3-alpha, 0.23.5, 0.23.6
>
> Attachments: hdfs-4186-branch-0.23-inaccurate-batched-sync-count.patch, hdfs-4186-trunk.patch, hdfs-4186-trunk-skip-standbyException.patch
>
>
> As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
> Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Posted by "Daryn Sharp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497613#comment-13497613 ]
Daryn Sharp commented on HDFS-4186:
-----------------------------------
It looks like the 23 patch is updated, but the trunk patch isn't?
> logSync() is called with the write lock held while releasing lease
> ------------------------------------------------------------------
>
> Key: HDFS-4186
> URL: https://issues.apache.org/jira/browse/HDFS-4186
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.23.4, 2.0.2-alpha
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Priority: Critical
> Attachments: hdfs-4186-branch-0.23-inaccurate-batched-sync-count.patch, hdfs-4186-branch-0.23-inaccurate-batched-sync-count.patch, hdfs-4186-trunk-inaccurate-batched-sync-count.patch, hdfs-4186-trunk-inaccurate-batched-sync-count.patch, hdfs-4186-trunk.patch
>
>
> As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
> Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Posted by "Kihwal Lee (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kihwal Lee updated HDFS-4186:
-----------------------------
Attachment: hdfs-4186-trunk-inaccurate-batched-sync-count.patch
hdfs-4186-branch-0.23-inaccurate-batched-sync-count.patch
Updated patches address Daryn's comment.
> logSync() is called with the write lock held while releasing lease
> ------------------------------------------------------------------
>
> Key: HDFS-4186
> URL: https://issues.apache.org/jira/browse/HDFS-4186
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.23.4, 2.0.2-alpha
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Priority: Critical
> Attachments: hdfs-4186-branch-0.23-inaccurate-batched-sync-count.patch, hdfs-4186-branch-0.23-inaccurate-batched-sync-count.patch, hdfs-4186-trunk-inaccurate-batched-sync-count.patch, hdfs-4186-trunk-inaccurate-batched-sync-count.patch, hdfs-4186-trunk.patch
>
>
> As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
> Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Posted by "Kihwal Lee (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497714#comment-13497714 ]
Kihwal Lee commented on HDFS-4186:
----------------------------------
About the test failures, the original patch doesn't have this problem, it's hitting these after taking out the thread local var. This is because logSync() is called even in StandbyException. I will make them skip logSync() in case of StandbyException.
> logSync() is called with the write lock held while releasing lease
> ------------------------------------------------------------------
>
> Key: HDFS-4186
> URL: https://issues.apache.org/jira/browse/HDFS-4186
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.23.4, 2.0.2-alpha
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Priority: Critical
> Attachments: hdfs-4186-branch-0.23-inaccurate-batched-sync-count.patch, hdfs-4186-branch-0.23-inaccurate-batched-sync-count.patch, hdfs-4186-trunk-inaccurate-batched-sync-count.patch, hdfs-4186-trunk-inaccurate-batched-sync-count.patch, hdfs-4186-trunk.patch
>
>
> As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
> Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Posted by "Kihwal Lee (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kihwal Lee updated HDFS-4186:
-----------------------------
Attachment: hdfs-4186-trunk-inaccurate-batched-sync-count.patch
hdfs-4186-branch-0.23-inaccurate-batched-sync-count.patch
The new patches are without the extra thread local variable. The new tracking in lease monitor should make the error in batched syncs count low by calling logSync() only when necessary.
> logSync() is called with the write lock held while releasing lease
> ------------------------------------------------------------------
>
> Key: HDFS-4186
> URL: https://issues.apache.org/jira/browse/HDFS-4186
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.23.4, 2.0.2-alpha
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Priority: Critical
> Attachments: hdfs-4186-branch-0.23-inaccurate-batched-sync-count.patch, hdfs-4186-trunk-inaccurate-batched-sync-count.patch, hdfs-4186-trunk.patch
>
>
> As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
> Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497614#comment-13497614 ]
Hadoop QA commented on HDFS-4186:
---------------------------------
{color:red}-1 overall{color}. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12553577/hdfs-4186-trunk-inaccurate-batched-sync-count.patch
against trunk revision .
{color:green}+1 @author{color}. The patch does not contain any @author tags.
{color:green}+1 tests included{color}. The patch appears to include 1 new or modified test files.
{color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings.
{color:green}+1 javadoc{color}. The javadoc tool did not generate any warning messages.
{color:green}+1 eclipse:eclipse{color}. The patch built with eclipse:eclipse.
{color:green}+1 findbugs{color}. The patch does not introduce any new Findbugs (version 1.3.9) warnings.
{color:green}+1 release audit{color}. The applied patch does not increase the total number of release audit warnings.
{color:red}-1 core tests{color}. The patch failed these unit tests in hadoop-hdfs-project/hadoop-hdfs:
org.apache.hadoop.hdfs.server.namenode.ha.TestPipelinesFailover
{color:green}+1 contrib tests{color}. The patch passed contrib unit tests.
Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/3506//testReport/
Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/3506//console
This message is automatically generated.
> logSync() is called with the write lock held while releasing lease
> ------------------------------------------------------------------
>
> Key: HDFS-4186
> URL: https://issues.apache.org/jira/browse/HDFS-4186
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.23.4, 2.0.2-alpha
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Priority: Critical
> Attachments: hdfs-4186-branch-0.23-inaccurate-batched-sync-count.patch, hdfs-4186-branch-0.23-inaccurate-batched-sync-count.patch, hdfs-4186-trunk-inaccurate-batched-sync-count.patch, hdfs-4186-trunk-inaccurate-batched-sync-count.patch, hdfs-4186-trunk.patch
>
>
> As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
> Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Posted by "Kihwal Lee (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kihwal Lee updated HDFS-4186:
-----------------------------
Attachment: (was: hdfs-4186-trunk-inaccurate-batched-sync-count.patch)
> logSync() is called with the write lock held while releasing lease
> ------------------------------------------------------------------
>
> Key: HDFS-4186
> URL: https://issues.apache.org/jira/browse/HDFS-4186
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.23.4, 2.0.2-alpha
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Priority: Critical
> Attachments: hdfs-4186-branch-0.23-inaccurate-batched-sync-count.patch, hdfs-4186-trunk.patch, hdfs-4186-trunk-skip-standbyException.patch
>
>
> As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
> Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13498791#comment-13498791 ]
Hudson commented on HDFS-4186:
------------------------------
Integrated in Hadoop-Hdfs-trunk #1228 (See [https://builds.apache.org/job/Hadoop-Hdfs-trunk/1228/])
HDFS-4186. logSync() is called with the write lock held while releasing lease (Kihwal Lee via daryn) (Revision 1409988)
Result = SUCCESS
daryn : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1409988
Files :
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/LeaseManager.java
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestEditLog.java
> logSync() is called with the write lock held while releasing lease
> ------------------------------------------------------------------
>
> Key: HDFS-4186
> URL: https://issues.apache.org/jira/browse/HDFS-4186
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.23.4, 2.0.2-alpha
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Priority: Critical
> Fix For: 3.0.0, 2.0.3-alpha, 0.23.5, 0.23.6
>
> Attachments: hdfs-4186-branch-0.23-inaccurate-batched-sync-count.patch, hdfs-4186-trunk.patch, hdfs-4186-trunk-skip-standbyException.patch
>
>
> As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
> Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497364#comment-13497364 ]
Todd Lipcon commented on HDFS-4186:
-----------------------------------
Maybe I'm being too nit picky, but I'd rather see the optimization around skipping logSync when nothing has been logged separate from this bug fix for lease recovery. There have been enough synchronization bugs around the FSEditLog code paths that I think it deserves its own JIRA (which we could cautiously put it only 3.0 at first, for example). I haven't generally seen the FSEditLog monitor be a point of contention, since it's only held for very short amounts of time, so the value of the optimization seems low compared to the added complexity.
> logSync() is called with the write lock held while releasing lease
> ------------------------------------------------------------------
>
> Key: HDFS-4186
> URL: https://issues.apache.org/jira/browse/HDFS-4186
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.23.4, 2.0.2-alpha
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Priority: Critical
> Attachments: hdfs-4186-trunk.patch
>
>
> As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
> Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Posted by "Kihwal Lee (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497355#comment-13497355 ]
Kihwal Lee commented on HDFS-4186:
----------------------------------
I reran all the failed tests. They fail with HDFS-4171 and they pass without HDFS-4171.
> logSync() is called with the write lock held while releasing lease
> ------------------------------------------------------------------
>
> Key: HDFS-4186
> URL: https://issues.apache.org/jira/browse/HDFS-4186
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.23.4, 2.0.2-alpha
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Priority: Critical
> Attachments: hdfs-4186-trunk.patch
>
>
> As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
> Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497677#comment-13497677 ]
Hadoop QA commented on HDFS-4186:
---------------------------------
{color:red}-1 overall{color}. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12553585/hdfs-4186-trunk-inaccurate-batched-sync-count.patch
against trunk revision .
{color:green}+1 @author{color}. The patch does not contain any @author tags.
{color:green}+1 tests included{color}. The patch appears to include 1 new or modified test files.
{color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings.
{color:green}+1 javadoc{color}. The javadoc tool did not generate any warning messages.
{color:green}+1 eclipse:eclipse{color}. The patch built with eclipse:eclipse.
{color:green}+1 findbugs{color}. The patch does not introduce any new Findbugs (version 1.3.9) warnings.
{color:green}+1 release audit{color}. The applied patch does not increase the total number of release audit warnings.
{color:red}-1 core tests{color}. The patch failed these unit tests in hadoop-hdfs-project/hadoop-hdfs:
org.apache.hadoop.hdfs.server.namenode.ha.TestPipelinesFailover
{color:green}+1 contrib tests{color}. The patch passed contrib unit tests.
Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/3507//testReport/
Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/3507//console
This message is automatically generated.
> logSync() is called with the write lock held while releasing lease
> ------------------------------------------------------------------
>
> Key: HDFS-4186
> URL: https://issues.apache.org/jira/browse/HDFS-4186
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.23.4, 2.0.2-alpha
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Priority: Critical
> Attachments: hdfs-4186-branch-0.23-inaccurate-batched-sync-count.patch, hdfs-4186-branch-0.23-inaccurate-batched-sync-count.patch, hdfs-4186-trunk-inaccurate-batched-sync-count.patch, hdfs-4186-trunk-inaccurate-batched-sync-count.patch, hdfs-4186-trunk.patch
>
>
> As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
> Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Posted by "Daryn Sharp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497588#comment-13497588 ]
Daryn Sharp commented on HDFS-4186:
-----------------------------------
I think the patch looks generally good, except when it bails out early on {{if (!oldest.expiredHardLimit())}}. I think it should return {{needSync}} instead of false? Minor nit is "happenned" is misspelled.
bq. Maybe I'm being too nit picky, but I'd rather see the optimization around skipping logSync when nothing has been logged separate from this bug fix for lease recovery.
While we could break this into another jira if you feel strongly, I think the latest patch seems pretty simple in nature. I think it's esp. good in the sense of not generating bad metrics. If we are going to track a number, it should probably be an accurate number. I think that was a pretty good catch by Kihwal.
> logSync() is called with the write lock held while releasing lease
> ------------------------------------------------------------------
>
> Key: HDFS-4186
> URL: https://issues.apache.org/jira/browse/HDFS-4186
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.23.4, 2.0.2-alpha
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Priority: Critical
> Attachments: hdfs-4186-branch-0.23-inaccurate-batched-sync-count.patch, hdfs-4186-trunk-inaccurate-batched-sync-count.patch, hdfs-4186-trunk.patch
>
>
> As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
> Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13498807#comment-13498807 ]
Hudson commented on HDFS-4186:
------------------------------
Integrated in Hadoop-Mapreduce-trunk #1259 (See [https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1259/])
HDFS-4186. logSync() is called with the write lock held while releasing lease (Kihwal Lee via daryn) (Revision 1409988)
Result = FAILURE
daryn : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1409988
Files :
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/LeaseManager.java
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestEditLog.java
> logSync() is called with the write lock held while releasing lease
> ------------------------------------------------------------------
>
> Key: HDFS-4186
> URL: https://issues.apache.org/jira/browse/HDFS-4186
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.23.4, 2.0.2-alpha
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Priority: Critical
> Fix For: 3.0.0, 2.0.3-alpha, 0.23.5, 0.23.6
>
> Attachments: hdfs-4186-branch-0.23-inaccurate-batched-sync-count.patch, hdfs-4186-trunk.patch, hdfs-4186-trunk-skip-standbyException.patch
>
>
> As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
> Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Posted by "Kihwal Lee (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497183#comment-13497183 ]
Kihwal Lee commented on HDFS-4186:
----------------------------------
These tests started failing since last night. I am guessing HDFS-4171.
https://builds.apache.org/view/Hadoop/job/Hadoop-Hdfs-trunk/1226/
> logSync() is called with the write lock held while releasing lease
> ------------------------------------------------------------------
>
> Key: HDFS-4186
> URL: https://issues.apache.org/jira/browse/HDFS-4186
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.23.4, 2.0.2-alpha
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Priority: Critical
> Attachments: hdfs-4186-trunk.patch
>
>
> As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
> Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Posted by "Kihwal Lee (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kihwal Lee updated HDFS-4186:
-----------------------------
Attachment: hdfs-4186-trunk.patch
The patch makes logSync() deferred a bit for lease reassignment. From several methods in FSNamesapce that may cause lease reassignment are now calling logSync() in their finally block after releasing the write lock. It needs to be in a finally block, since lease recovery can throw an exception after lease reassignment.
logSync() was modified to look at a new thread local variable for determining whether there is any logged transactions by the thread. When this variable is false, it returns right away. This variable is set whenever logEdit() is called and cleared when the log is synced. This is also unconditionally set for logSyncAll(). This does not indicate the sync state. I.e. even if it is true, another thread might have already synced all transactions by this thread.
In the lease monitor thread, logSync() is called after checkLeases() is done and the write lock is released. All transactions logged in checkLeases() will be batched.
> logSync() is called with the write lock held while releasing lease
> ------------------------------------------------------------------
>
> Key: HDFS-4186
> URL: https://issues.apache.org/jira/browse/HDFS-4186
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.23.4, 2.0.2-alpha
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Priority: Critical
> Attachments: hdfs-4186-trunk.patch
>
>
> As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
> Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Posted by "Kihwal Lee (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kihwal Lee reassigned HDFS-4186:
--------------------------------
Assignee: Kihwal Lee
> logSync() is called with the write lock held while releasing lease
> ------------------------------------------------------------------
>
> Key: HDFS-4186
> URL: https://issues.apache.org/jira/browse/HDFS-4186
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.23.4, 2.0.2-alpha
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Priority: Critical
>
> As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
> Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497789#comment-13497789 ]
Hadoop QA commented on HDFS-4186:
---------------------------------
{color:red}-1 overall{color}. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12553607/hdfs-4186-trunk-skip-standbyException.patch
against trunk revision .
{color:green}+1 @author{color}. The patch does not contain any @author tags.
{color:green}+1 tests included{color}. The patch appears to include 1 new or modified test files.
{color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings.
{color:green}+1 javadoc{color}. The javadoc tool did not generate any warning messages.
{color:green}+1 eclipse:eclipse{color}. The patch built with eclipse:eclipse.
{color:green}+1 findbugs{color}. The patch does not introduce any new Findbugs (version 1.3.9) warnings.
{color:green}+1 release audit{color}. The applied patch does not increase the total number of release audit warnings.
{color:red}-1 core tests{color}. The patch failed these unit tests in hadoop-hdfs-project/hadoop-hdfs:
org.apache.hadoop.hdfs.TestHDFSFileSystemContract
{color:green}+1 contrib tests{color}. The patch passed contrib unit tests.
Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/3512//testReport/
Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/3512//console
This message is automatically generated.
> logSync() is called with the write lock held while releasing lease
> ------------------------------------------------------------------
>
> Key: HDFS-4186
> URL: https://issues.apache.org/jira/browse/HDFS-4186
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.23.4, 2.0.2-alpha
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Priority: Critical
> Attachments: hdfs-4186-branch-0.23-inaccurate-batched-sync-count.patch, hdfs-4186-trunk.patch, hdfs-4186-trunk-skip-standbyException.patch
>
>
> As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
> Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Posted by "Kihwal Lee (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kihwal Lee updated HDFS-4186:
-----------------------------
Status: Patch Available (was: Open)
> logSync() is called with the write lock held while releasing lease
> ------------------------------------------------------------------
>
> Key: HDFS-4186
> URL: https://issues.apache.org/jira/browse/HDFS-4186
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 2.0.2-alpha, 0.23.4
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Priority: Critical
> Attachments: hdfs-4186-trunk.patch
>
>
> As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
> Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13498339#comment-13498339 ]
Hudson commented on HDFS-4186:
------------------------------
Integrated in Hadoop-trunk-Commit #3028 (See [https://builds.apache.org/job/Hadoop-trunk-Commit/3028/])
HDFS-4186. logSync() is called with the write lock held while releasing lease (Kihwal Lee via daryn) (Revision 1409988)
Result = SUCCESS
daryn : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1409988
Files :
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/LeaseManager.java
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestEditLog.java
> logSync() is called with the write lock held while releasing lease
> ------------------------------------------------------------------
>
> Key: HDFS-4186
> URL: https://issues.apache.org/jira/browse/HDFS-4186
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.23.4, 2.0.2-alpha
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Priority: Critical
> Fix For: 3.0.0, 2.0.3-alpha, 0.23.5, 0.23.6
>
> Attachments: hdfs-4186-branch-0.23-inaccurate-batched-sync-count.patch, hdfs-4186-trunk.patch, hdfs-4186-trunk-skip-standbyException.patch
>
>
> As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
> Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Posted by "Kihwal Lee (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kihwal Lee updated HDFS-4186:
-----------------------------
Attachment: hdfs-4186-trunk-skip-standbyException.patch
branch 0.23 does not need new patch since it does not have HA.
> logSync() is called with the write lock held while releasing lease
> ------------------------------------------------------------------
>
> Key: HDFS-4186
> URL: https://issues.apache.org/jira/browse/HDFS-4186
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.23.4, 2.0.2-alpha
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Priority: Critical
> Attachments: hdfs-4186-branch-0.23-inaccurate-batched-sync-count.patch, hdfs-4186-branch-0.23-inaccurate-batched-sync-count.patch, hdfs-4186-trunk-inaccurate-batched-sync-count.patch, hdfs-4186-trunk-inaccurate-batched-sync-count.patch, hdfs-4186-trunk.patch, hdfs-4186-trunk-skip-standbyException.patch
>
>
> As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
> Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Posted by "Kihwal Lee (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497795#comment-13497795 ]
Kihwal Lee commented on HDFS-4186:
----------------------------------
The test failure was not caused by the patch, but by a recent commit of HADOOP-9042. In their precommit build, only the tests in common ran, but a test in HDFS has dependency on it. Reopned HADOOP-9042 and left a comment.
> logSync() is called with the write lock held while releasing lease
> ------------------------------------------------------------------
>
> Key: HDFS-4186
> URL: https://issues.apache.org/jira/browse/HDFS-4186
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.23.4, 2.0.2-alpha
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Priority: Critical
> Attachments: hdfs-4186-branch-0.23-inaccurate-batched-sync-count.patch, hdfs-4186-trunk.patch, hdfs-4186-trunk-skip-standbyException.patch
>
>
> As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
> Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Posted by "Kihwal Lee (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497391#comment-13497391 ]
Kihwal Lee commented on HDFS-4186:
----------------------------------
If ppl don't have problem with incorrect batched sync metrics, I will take it out.
> logSync() is called with the write lock held while releasing lease
> ------------------------------------------------------------------
>
> Key: HDFS-4186
> URL: https://issues.apache.org/jira/browse/HDFS-4186
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.23.4, 2.0.2-alpha
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Priority: Critical
> Attachments: hdfs-4186-trunk.patch
>
>
> As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
> Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Posted by "Daryn Sharp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13498061#comment-13498061 ]
Daryn Sharp commented on HDFS-4186:
-----------------------------------
Looks pretty straightforward. +1, conditional on Todd's approval of the patch.
> logSync() is called with the write lock held while releasing lease
> ------------------------------------------------------------------
>
> Key: HDFS-4186
> URL: https://issues.apache.org/jira/browse/HDFS-4186
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.23.4, 2.0.2-alpha
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Priority: Critical
> Attachments: hdfs-4186-branch-0.23-inaccurate-batched-sync-count.patch, hdfs-4186-trunk.patch, hdfs-4186-trunk-skip-standbyException.patch
>
>
> As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
> Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Posted by "Kihwal Lee (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497603#comment-13497603 ]
Kihwal Lee commented on HDFS-4186:
----------------------------------
As suggested by Todd, I filed HDFS-4191 to add the per-thread transaction tracking, which is removed from the latest patch for this jira.
> logSync() is called with the write lock held while releasing lease
> ------------------------------------------------------------------
>
> Key: HDFS-4186
> URL: https://issues.apache.org/jira/browse/HDFS-4186
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.23.4, 2.0.2-alpha
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Priority: Critical
> Attachments: hdfs-4186-branch-0.23-inaccurate-batched-sync-count.patch, hdfs-4186-branch-0.23-inaccurate-batched-sync-count.patch, hdfs-4186-trunk-inaccurate-batched-sync-count.patch, hdfs-4186-trunk-inaccurate-batched-sync-count.patch, hdfs-4186-trunk.patch
>
>
> As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
> Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13498718#comment-13498718 ]
Hudson commented on HDFS-4186:
------------------------------
Integrated in Hadoop-Yarn-trunk #38 (See [https://builds.apache.org/job/Hadoop-Yarn-trunk/38/])
HDFS-4186. logSync() is called with the write lock held while releasing lease (Kihwal Lee via daryn) (Revision 1409988)
Result = SUCCESS
daryn : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1409988
Files :
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/LeaseManager.java
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestEditLog.java
> logSync() is called with the write lock held while releasing lease
> ------------------------------------------------------------------
>
> Key: HDFS-4186
> URL: https://issues.apache.org/jira/browse/HDFS-4186
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.23.4, 2.0.2-alpha
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Priority: Critical
> Fix For: 3.0.0, 2.0.3-alpha, 0.23.5, 0.23.6
>
> Attachments: hdfs-4186-branch-0.23-inaccurate-batched-sync-count.patch, hdfs-4186-trunk.patch, hdfs-4186-trunk-skip-standbyException.patch
>
>
> As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
> Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13496911#comment-13496911 ]
Todd Lipcon commented on HDFS-4186:
-----------------------------------
Hey Kihwal. Can you explain why the new ThreadLocal is necessary?
Without the new ThreadLocal, the thread would just have a too-low txid, which would already be synced from some previous call on the same IPC handler. So the logSync would already end up a no-op, given the synced txid already will be higher than this point.
> logSync() is called with the write lock held while releasing lease
> ------------------------------------------------------------------
>
> Key: HDFS-4186
> URL: https://issues.apache.org/jira/browse/HDFS-4186
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.23.4, 2.0.2-alpha
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Priority: Critical
> Attachments: hdfs-4186-trunk.patch
>
>
> As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
> Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Posted by "Kihwal Lee (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kihwal Lee updated HDFS-4186:
-----------------------------
Target Version/s: 3.0.0, 2.0.3-alpha, 0.23.6 (was: 3.0.0, 2.0.3-alpha, 0.23.5)
> logSync() is called with the write lock held while releasing lease
> ------------------------------------------------------------------
>
> Key: HDFS-4186
> URL: https://issues.apache.org/jira/browse/HDFS-4186
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.23.4, 2.0.2-alpha
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Priority: Critical
> Attachments: hdfs-4186-branch-0.23-inaccurate-batched-sync-count.patch, hdfs-4186-trunk.patch, hdfs-4186-trunk-skip-standbyException.patch
>
>
> As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
> Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Posted by "Daryn Sharp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daryn Sharp updated HDFS-4186:
------------------------------
Resolution: Fixed
Fix Version/s: 0.23.6
0.23.5
2.0.3-alpha
3.0.0
Hadoop Flags: Reviewed
Status: Resolved (was: Patch Available)
I've checked this into trunk, branch 2, 23, and 23.5. Thanks Kihwal!
> logSync() is called with the write lock held while releasing lease
> ------------------------------------------------------------------
>
> Key: HDFS-4186
> URL: https://issues.apache.org/jira/browse/HDFS-4186
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.23.4, 2.0.2-alpha
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Priority: Critical
> Fix For: 3.0.0, 2.0.3-alpha, 0.23.5, 0.23.6
>
> Attachments: hdfs-4186-branch-0.23-inaccurate-batched-sync-count.patch, hdfs-4186-trunk.patch, hdfs-4186-trunk-skip-standbyException.patch
>
>
> As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
> Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-4186) logSync() is called with the write
lock held while releasing lease
Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497147#comment-13497147 ]
Hadoop QA commented on HDFS-4186:
---------------------------------
{color:red}-1 overall{color}. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12553453/hdfs-4186-trunk.patch
against trunk revision .
{color:green}+1 @author{color}. The patch does not contain any @author tags.
{color:green}+1 tests included{color}. The patch appears to include 1 new or modified test files.
{color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings.
{color:green}+1 javadoc{color}. The javadoc tool did not generate any warning messages.
{color:green}+1 eclipse:eclipse{color}. The patch built with eclipse:eclipse.
{color:green}+1 findbugs{color}. The patch does not introduce any new Findbugs (version 1.3.9) warnings.
{color:green}+1 release audit{color}. The applied patch does not increase the total number of release audit warnings.
{color:red}-1 core tests{color}. The patch failed these unit tests in hadoop-hdfs-project/hadoop-hdfs:
org.apache.hadoop.hdfs.web.TestWebHDFS
org.apache.hadoop.hdfs.web.TestWebHdfsWithMultipleNameNodes
org.apache.hadoop.hdfs.server.namenode.TestAuditLogs
org.apache.hadoop.hdfs.TestQuota
org.apache.hadoop.hdfs.web.TestFSMainOperationsWebHdfs
org.apache.hadoop.hdfs.TestDistributedFileSystem
org.apache.hadoop.hdfs.security.TestDelegationToken
org.apache.hadoop.fs.TestFcHdfsSymlink
org.apache.hadoop.hdfs.web.TestWebHdfsFileSystemContract
org.apache.hadoop.hdfs.security.TestDelegationTokenForProxyUser
{color:green}+1 contrib tests{color}. The patch passed contrib unit tests.
Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/3500//testReport/
Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/3500//console
This message is automatically generated.
> logSync() is called with the write lock held while releasing lease
> ------------------------------------------------------------------
>
> Key: HDFS-4186
> URL: https://issues.apache.org/jira/browse/HDFS-4186
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.23.4, 2.0.2-alpha
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Priority: Critical
> Attachments: hdfs-4186-trunk.patch
>
>
> As pointed out in HDFS-4138, when the lease monitor calls internalReleaseLease(), it acquires the namespace write lock. Inside internalReleaseLease(), if a block recovery is needed, the lease is reassigned to the namenode itself and this is logged & synced in logReassignLease().
> Since this is done while the write lock is held, log syncing is blocked. When a large number of leases are expired and blocks are recovered, namenode can slow down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira