trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [trafodion] selvaganesang opened a new pull request #1861: [TRAFODION-3331] JDBC T4 driver to support login timeout and query timeout
Date Fri, 04 Oct 2019 21:35:57 GMT
selvaganesang opened a new 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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message