Samarth Jain created PHOENIX-2222: ------------------------------------- Summary: Don't increment timestamp when doing local index build Key: PHOENIX-2222 URL: https://issues.apache.org/jira/browse/PHOENIX-2222 Project: Phoenix Issue Type: Bug Reporter: Samarth Jain
In MetadataClient#buildIndex, we are incrementing the timestamp by 1. From the comment it looks like this was added to take into account clock skews on certain OSs (like windows). The side effect is that on the other OSs this could cause the select count(*) query to read more data than it should have. {code} try { if(plan.getContext().getScanTimeRange()==null) { Long scn = connection.getSCN(); if (scn == null) { scn = plan.getContext().getCurrentTime(); // Add one to server time since max of time range is exclusive // and we need to account of OSs with lower resolution clocks. if (scn < HConstants.LATEST_TIMESTAMP) { scn++; } } plan.getContext().setScanTimeRange(new TimeRange(dataTableRef.getLowerBoundTimeStamp(),scn)); } } {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)