Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDFS-17394. [FGL] Remove unused WriteHoldCount of FSNamesystemLock #6571

Merged
merged 1 commit into from
Feb 27, 2024

Conversation

ZanderXu
Copy link
Contributor

public int getWriteHoldCount() {
  return this.fsLock.getWriteHoldCount(FSNamesystemLockMode.GLOBAL);
}

@Deprecated // dirLock is obsolete, use namesystem.fsLock instead
public int getWriteHoldCount() {
  return namesystem.getWriteHoldCount();
}

// sanity check.
if (!hadDirReadLock || !hadFsnReadLock || hadDirWriteLock ||
    hadFsnWriteLock || dir.getReadHoldCount() != 1 ||
    fsn.getReadHoldCount() != 1) {
  // cannot relinquish
  return false;
} 

getWriteHoldCount in FSNamesystem.java and FSDirectory.java is unused.
dir.getReadHoldCount() is useless as it's same as fsn.getReadHoldCount().

@xinglin
Copy link
Contributor

xinglin commented Feb 23, 2024

can we trigger a new build?

Copy link
Contributor

@xinglin xinglin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change lgtm. pending yetus build

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 0s Docker mode activated.
-1 ❌ patch 0m 19s #6571 does not apply to HDFS-17384. Rebase required? Wrong Branch? See https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute for help.
Subsystem Report/Notes
GITHUB PR #6571
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6571/2/console
versions git=2.34.1
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@ferhui ferhui merged commit d58260a into apache:HDFS-17384 Feb 27, 2024
1 of 2 checks passed
@ferhui
Copy link
Contributor

ferhui commented Feb 27, 2024

@ZanderXu Thanks for this patch. @xinglin Thanks for reviewing it. Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants