phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Samarth Jain (JIRA)" <>
Subject [jira] [Created] (PHOENIX-2222) Don't increment timestamp when doing local index build
Date Tue, 01 Sep 2015 20:20:49 GMT
Samarth Jain created PHOENIX-2222:

             Summary: Don't increment timestamp when doing local index build
                 Key: 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. 

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) {
                        plan.getContext().setScanTimeRange(new TimeRange(dataTableRef.getLowerBoundTimeStamp(),scn));

This message was sent by Atlassian JIRA

View raw message