You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "hiping-tech (via GitHub)" <gi...@apache.org> on 2023/09/12 15:55:51 UTC
[GitHub] [hbase] hiping-tech commented on a diff in pull request #5381: HBASE-28058 Adjust the order of acquiring the takeSnapshot locks to r…esolve the deadlock issue.
hiping-tech commented on code in PR #5381:
URL: https://github.com/apache/hbase/pull/5381#discussion_r1323255457
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.java:
##########
@@ -670,11 +670,13 @@ public void takeSnapshot(SnapshotDescription snapshot) throws IOException {
}
}
- public synchronized long takeSnapshot(SnapshotDescription snapshot, long nonceGroup, long nonce)
+ public long takeSnapshot(SnapshotDescription snapshot, long nonceGroup, long nonce)
throws IOException {
this.takingSnapshotLock.readLock().lock();
try {
- return submitSnapshotProcedure(snapshot, nonceGroup, nonce);
+ synchronized(this){
Review Comment:
Thank you for your review and valuable suggestions. I have made the necessary changes based on the suggestions provided.
--
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: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org