[ https://issues.apache.org/jira/browse/PHOENIX-85?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13916573#comment-13916573 ]
ASF GitHub Bot commented on PHOENIX-85: --------------------------------------- Github user maryannxue commented on a diff in the pull request: https://github.com/apache/incubator-phoenix/pull/10#discussion_r10186139 --- Diff: phoenix-core/src/main/java/org/apache/phoenix/execute/HashJoinPlan.java --- @@ -99,8 +109,14 @@ public ResultIterator iterator() throws SQLException { @Override public ServerCache call() throws Exception { QueryPlan hashPlan = hashPlans[index]; - return hashClient.addHashCache(ranges, hashPlan.iterator(), + ServerCache cache = hashClient.addHashCache(ranges, hashPlan.iterator(), hashPlan.getEstimatedSize(), hashExpressions[index], plan.getTableRef()); + long endTime = System.currentTimeMillis(); + boolean isSet = firstJobEndTime.compareAndSet(0, endTime); + if (!isSet && (endTime - firstJobEndTime.get()) > maxServerCacheTimeToLive) { + LOG.warn("Hash plan [" + index + "] execution seems too slow. Earlier hash cache(s) might have expired on servers."); --- End diff -- Just when doing star-join, say, several inner tables are being scanned and added to server cache, and the outer table scan won't start until every inner table has been added to server cache. Then if one or more of the table scans run seriously slower than the others, when these scans finish, the other tables that finish much earlier might have expired in the cache. However, I checked the spec for "guava cache". Seems that cache expiration and cleanup does not always actively happen, so that the cache map won't be locked in conflict with user writes. So I suppose warning here can act as a good reminder for potential issue whether or not the problem actually occurs. > Refine error handling in HashJoinPlan execution and add warnings > ---------------------------------------------------------------- > > Key: PHOENIX-85 > URL: https://issues.apache.org/jira/browse/PHOENIX-85 > Project: Phoenix > Issue Type: Improvement > Affects Versions: 3.0.0 > Reporter: Maryann Xue > Assignee: Maryann Xue > Priority: Trivial > Fix For: 3.0.0 > > Original Estimate: 24h > Remaining Estimate: 24h > > Remove all hash cache spontaneously if any of the sub-query execution raises > an exception. > Compare the end time of each sub-query execution with the earliest finished > sub-query execution. If the time difference is greater than the "max server > cache live time", warn users that the earlier hash caches on the server might > have expired and have been removed. -- This message was sent by Atlassian JIRA (v6.1.5#6160)