Hexiaoqiao commented on PR #4141: URL: https://github.com/apache/hadoop/pull/4141#issuecomment-1098081845
LGTM +1 from my side. I would like to check into trunk if no furthermore feedback while 5 work days later. > 1、some method is not good change to volume lock, and if split to volume lock it have to get locks and release locks sequence(like acquire lock1, lock2, lock3, release lock 3 lock2 lock1).So just acquire block pool lock is enough. > 2、some method like contains() is no need to acquire volume lock.Now it acquire block pool lock read lock, so it no need to acquire block pool lock read lock and volume lock. I would like to clarify this explanation. This improvement only change part of methods from block pool level lock to volume level lock rather all. Because, A. No Improvement. Such as for add/remove Volume method, Lock level 0 (block pool level lock) is enough and safe to execute logic. Some others is similar. or B. No Necessary. For some query request, acquire block pool level read lock has safe-guarded, so it is not necessary to acquire volume level read lock again. Thanks @MingXiangLi for your works. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
