gjacoby126 commented on code in PR #1589:
URL: https://github.com/apache/phoenix/pull/1589#discussion_r1167094574
##########
phoenix-core/src/main/java/org/apache/phoenix/iterate/ScanningResultIterator.java:
##########
@@ -173,6 +177,12 @@ public Tuple next() throws SQLException {
try {
Result result = scanner.next();
while (result != null && (result.isEmpty() || isDummy(result))) {
+ long timeOutForScan = maxQueryEndTime -
EnvironmentEdgeManager.currentTimeMillis();
+ if (timeOutForScan < 0) {
+ throw new
SQLExceptionInfo.Builder(OPERATION_TIMED_OUT).setMessage(
+ ". Query couldn't be completed in the allotted
time at ScanningResultIterator: "
Review Comment:
nit: We probably shouldn't be mentioning Phoenix internals like
ScanningResultIterator in an error message that goes back to end-users.
##########
phoenix-core/src/it/java/org/apache/phoenix/end2end/MapReduceIT.java:
##########
@@ -135,6 +164,73 @@ private void createAndTestJob(Connection conn, String s,
double v, String tenant
}
+ private void createPagedJobAndTestFailedJobDueToTimeOut(Connection conn,
String s, double v, String tenantId,
Review Comment:
nit: function-level variables should have meaningful names more than 1
character (not "s" or "v"). (For temp variables in a loop this would be fine)
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]