hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "1565321541" <1565321...@qq.com>
Subject confusion about the HBASE-11403 race condition issue
Date Thu, 08 Aug 2019 10:40:24 GMT
Recently, when I read the hbase source code of version 1.0.0, I found a method which I don't
understand very much. That is the class AsyncProcess.java in client package, I did not understand
why the code
 if (tasksInProgress.get() != oldInProgress)  break 
exist in the private void waitForMaximumCurrentTasks(int max) method, if the  passed parameter
max = 0,then it is possible that the tasksInProgress.get() > 0 but tasksInProgress.get()
!= oldInProgress,then the loop breaks,it is not what we want, we need all the previous jobs
is done before the loop breaks,right? In the HBASE-11403, it is added to fix the race condition
issue,I do not know what will cause race condition, I think it will not cause that issue at
all, it is impossible. When I click the url of the Test results, it is missing. Who can tell
me why the code tasksInProgress.get() != oldInProgress shoud be added there?
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message