You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by GitBox <gi...@apache.org> on 2020/01/13 21:04:35 UTC

[GitHub] [phoenix] swaroopak commented on a change in pull request #678: PHOENIX-5644 and PHOENIX-5651 addendum patch

swaroopak commented on a change in pull request #678: PHOENIX-5644 and PHOENIX-5651 addendum patch
URL: https://github.com/apache/phoenix/pull/678#discussion_r366026953
 
 

 ##########
 File path: phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/IndexUpgradeTool.java
 ##########
 @@ -424,20 +424,21 @@ private void enableImmutableTables(ConnectionQueryServices queryServices,
             long startWaitTime) {
         long endWaitTime = EnvironmentEdgeManager.currentTimeMillis();
         long waitMore = getWaitMoreTime(endWaitTime, startWaitTime);
-        while (waitMore>0) {
+        while (waitMore>0 && !isWaitComplete) {
             // If the table is immutable, we need to wait for clients to purge
             // their caches of table metadata
             LOGGER.info("waiting for more " + waitMore + " ms for client cache "
                     + "to expire for immutable tables");
             try {
                 startWaitTime = EnvironmentEdgeManager.currentTimeMillis();
                 Thread.sleep(waitMore);
-                waited = true;
+                isWaitComplete = true;
             } catch (InterruptedException e) {
                 endWaitTime = EnvironmentEdgeManager.currentTimeMillis();
 
 Review comment:
   This is exactly what I was doing before considering @gjacoby126 's suggestion to not ignore sleep interruptions and avoid cache incoherency. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services