Github user JamesRTaylor commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/268#discussion_r129185736
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/iterate/TableResultIterator.java 
---
    @@ -163,8 +185,38 @@ public Tuple next() throws SQLException {
                                 }
                             }
                             
plan.getContext().getConnection().getQueryServices().clearTableRegionCache(htable.getTableName());
    -                        this.scanIterator =
    -                                plan.iterator(scanGrouper, newScan);
    +                        if (e1 instanceof HashJoinCacheNotFoundException) {
    +                            logger.debug(
    +                                    "Retrying when Hash Join cache is not 
found on the server ,by sending the cache again");
    +                            if (retry <= 0) { throw e1; }
    +                            retry--;
    +                            try {
    +                                Long cacheId = 
((HashJoinCacheNotFoundException)e1).getCacheId();
    +                                if 
(!hashCacheClient.addHashCacheToServer(newScan.getStartRow(),
    +                                        
ServerCacheClient.getCacheForId(caches, cacheId), 
plan.getTableRef().getTable())) { throw e1; }
    +                                
    +                                try {
    +                                    
if(ScanUtil.isClientSideUpsertSelect(newScan)) {
    --- End diff --
    
    Why is this necessary? Can we generalize this is a better way?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to