aws / amazon-redshift-jdbc-driver

Redshift JDBC Driver. It supports JDBC 4.2 specification.
Apache License 2.0
63 stars 31 forks source link

Properly set cancel socket timeout like https://github.com/pgjdbc/pgjdbc/pull/2044 #77

Closed RealTYPICAL closed 1 year ago

RealTYPICAL commented 1 year ago

Driver version

2.0.0.3

Redshift version

PostgreSQL 8.0.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3), Redshift 1.0.44903

Client Operating System

UBI8

JAVA/JVM version

openjdk version "17.0.5" 2022-10-18

Table schema

N/A

Problem description

https://github.com/pgjdbc/pgjdbc/pull/2044 The file found here: https://github.com/pgjdbc/pgjdbc/pull/2044/commits/40b429e30c7f437476ab3afb8b63c213b3851b85#diff-fb626514a44e1fd93551464de0ba369def2b0513a7232ce12d9c3040ea98d211 contains a fix for timeouts which the redshift driver does not have. Not having this fix can cause cancel() to hang. Is it possible to include the PG fix in the redshift driver codebase?

  1. Socket timeout should be handled properly.
  2. cancel() can hang infinitely.
  3. Error message/stack trace:
  4. Any other details that can be helpful:

JDBC trace logs

Reproduction code

bhvkshah commented 1 year ago

Thank you for opening an issue. We will look into this and post here when we have an update.

bhvkshah commented 1 year ago

Thank you for contributing to the Redshift JDBC 2.x Driver. The fix for the issue above will be in version 2.1.0.11