-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
HBASE-25899 Improve efficiency of SnapshotHFileCleaner #3280
Conversation
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.java
Outdated
Show resolved
Hide resolved
hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.java
Outdated
Show resolved
Hide resolved
hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.java
Show resolved
Hide resolved
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
Signed-off-by: Duo Zhang <[email protected]>
synchronized (this) { | ||
refreshCache(); | ||
currentCache = cache; | ||
refreshed = true; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found this line is still blocking the delete tasks... basically I LOG.info/print the lock information before the line of if (lock == null || lock.tryLock()) {
, I found it won't add any unReferencedFiles
file because once a synchronized
refresh cache in line 207 is being called e.g. java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock@568e37c0[Locked by thread hfile_cleaner-dir-scan-pool-2]
, then whatever files passing in will be skipped.
maybe I'm wondered, why do we need a write lock for refreshing snapshot file cache ?
…eaner (apache#3280) Signed-off-by: Duo Zhang <[email protected]> (cherry picked from commit 76d56bc) Change-Id: I74defca8babde5a941985d8e560aa1c58a5f5bd3
More details in HBASE-25899