[ 
https://issues.apache.org/jira/browse/TRAFODION-3331?focusedWorklogId=323745&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-323745
 ]

ASF GitHub Bot logged work on TRAFODION-3331:
---------------------------------------------

                Author: ASF GitHub Bot
            Created on: 04/Oct/19 21:36
            Start Date: 04/Oct/19 21:36
    Worklog Time Spent: 10m 
      Work Description: selvaganesang commented on pull request #1861: 
[TRAFODION-3331] JDBC T4 driver to support login timeout and query timeout
URL: https://github.com/apache/trafodion/pull/1861
 
 
   1. Support to cancel the query when cqd CANCEL_QUERY_ALLOWED is set to OFF.
   
   When this CQD is set to OFF, the query can't be canceled gracefully because 
the query is not registered with cancel broker. This change allows the master 
process to be stopped and abort the query abruptly when the query is active for 
longer than the minimum required
   time. To activate this feature.
   
   - A variable MIN_QUERY_ACTIVE_TIME_IN_SECS_BEFORE_CANCEL=n need to be set 
where 'n' is duration in secs
   - control query cancel qid <qid> needs to issued after 'n' seconds.
   
   2. Streamlined the query timeout concept in JDBC driver and Sync up JDBC 
driver with this concept in the server side.
   
   - The 2 properties ignoreCancel and activeTimeBeforeCancelInSecs can be used 
to enable query timeout and cancel from JDBC driver. By default ignoreCancel is 
set to true, activeTimeBeforeCancelInSecs is set to -1.
   - During socket read, timeout is set based on type of request.  If it is 
connection related, timeout is login timeout and it will be query timeout 
otherwise.
   - By default network timeout is set to 1 secs. socket read times out every 1 
sec and check if the timeout has elapsed.
   - If the timeout pertains to the login timeout, an error is returned.
   - If the timeout pertains to the query timeout, if ignoreCancel is false, 
control query cancel qid is sent. If ignoreCancel is true, it is checked if the 
query has been active longer than activeTimeBeforeCancel. Then cancel is sent 
to server.
   - If Statement.cancel is issued by the application, then it is checked if 
the connection is waiting in socket read.  If so, the above timeout mechanism 
can kick in to send cancel to the server. If not, an internal close is issued 
to the server to free up system resources associated with the statement.
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

            Worklog Id:     (was: 323745)
    Remaining Estimate: 0h
            Time Spent: 10m

> JDBC T4 driver to support login timeout  and query timeout 
> -----------------------------------------------------------
>
>                 Key: TRAFODION-3331
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-3331
>             Project: Apache Trafodion
>          Issue Type: Bug
>            Reporter: Selvaganesan Govindarajan
>            Assignee: Selvaganesan Govindarajan
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> JDBC T4 driver lacks in functionality to support login timeout and query 
> timeout.  In addition the query timeout needs to sync up with cancelling 
> query functionality in Trafodion SQL engine. It is possible that graceful 
> query cancel is disabled in the Trafodion SQL engine. In that the process 
> that executes the query will be killed abruptly. In that case, query timeout 
> needs to tolerated till the query is active for some time before it can be 
> cancelled. This will avoid disruption to connection and hence normal 
> functioning of the application



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to