-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQL: JDBC timeout properties are parsed in ms instead of seconds #79480
Labels
Comments
elasticmachine
added
the
Team:QL (Deprecated)
Meta label for query languages team
label
Oct 19, 2021
Pinging @elastic/es-ql (Team:QL) |
Luegg
pushed a commit
to Luegg/elasticsearch
that referenced
this issue
Oct 21, 2021
Luegg
pushed a commit
to Luegg/elasticsearch
that referenced
this issue
Oct 25, 2021
Luegg
pushed a commit
that referenced
this issue
Oct 26, 2021
Resolves #79480 My initial thought was to change the properties to be interpreted as seconds but this might not be worth it. All relevant places in the code seem to assume the timeouts to be in ms and there does not seem to be a consistent use of ms or s across JDBC drivers (Postgres uses seconds, MySQL uses ms, MS SQL mixes the two depending on the connection property). Hence, just fixing the docs might be easier.
Luegg
pushed a commit
to Luegg/elasticsearch
that referenced
this issue
Oct 26, 2021
Resolves elastic#79480 My initial thought was to change the properties to be interpreted as seconds but this might not be worth it. All relevant places in the code seem to assume the timeouts to be in ms and there does not seem to be a consistent use of ms or s across JDBC drivers (Postgres uses seconds, MySQL uses ms, MS SQL mixes the two depending on the connection property). Hence, just fixing the docs might be easier.
Luegg
pushed a commit
to Luegg/elasticsearch
that referenced
this issue
Oct 26, 2021
Resolves elastic#79480 My initial thought was to change the properties to be interpreted as seconds but this might not be worth it. All relevant places in the code seem to assume the timeouts to be in ms and there does not seem to be a consistent use of ms or s across JDBC drivers (Postgres uses seconds, MySQL uses ms, MS SQL mixes the two depending on the connection property). Hence, just fixing the docs might be easier.
elasticsearchmachine
pushed a commit
that referenced
this issue
Oct 26, 2021
Resolves #79480 My initial thought was to change the properties to be interpreted as seconds but this might not be worth it. All relevant places in the code seem to assume the timeouts to be in ms and there does not seem to be a consistent use of ms or s across JDBC drivers (Postgres uses seconds, MySQL uses ms, MS SQL mixes the two depending on the connection property). Hence, just fixing the docs might be easier.
elasticsearchmachine
pushed a commit
that referenced
this issue
Oct 26, 2021
Resolves #79480 My initial thought was to change the properties to be interpreted as seconds but this might not be worth it. All relevant places in the code seem to assume the timeouts to be in ms and there does not seem to be a consistent use of ms or s across JDBC drivers (Postgres uses seconds, MySQL uses ms, MS SQL mixes the two depending on the connection property). Hence, just fixing the docs might be easier.
Luegg
pushed a commit
to Luegg/elasticsearch
that referenced
this issue
Oct 27, 2021
…uests (elastic#79491) * SQL: swap JDBC page.timeout and query.timeout properties in query requests resolves elastic#79430 * rm reference to elastic#79480 from spec
lockewritesdocs
pushed a commit
to lockewritesdocs/elasticsearch
that referenced
this issue
Oct 28, 2021
Resolves elastic#79480 My initial thought was to change the properties to be interpreted as seconds but this might not be worth it. All relevant places in the code seem to assume the timeouts to be in ms and there does not seem to be a consistent use of ms or s across JDBC drivers (Postgres uses seconds, MySQL uses ms, MS SQL mixes the two depending on the connection property). Hence, just fixing the docs might be easier.
Luegg
pushed a commit
to Luegg/elasticsearch
that referenced
this issue
Dec 17, 2021
…uests (elastic#79491) * SQL: swap JDBC page.timeout and query.timeout properties in query requests resolves elastic#79430 * rm reference to elastic#79480 from spec # Conflicts: # x-pack/plugin/sql/jdbc/src/main/java/org/elasticsearch/xpack/sql/jdbc/JdbcHttpClient.java # x-pack/plugin/sql/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/JdbcConfigurationDataSourceTests.java
elasticsearchmachine
pushed a commit
that referenced
this issue
Dec 20, 2021
…ery requests (#79491) (#81878) * SQL: swap JDBC page.timeout and query.timeout properties in query requests (#79491) * SQL: swap JDBC page.timeout and query.timeout properties in query requests resolves #79430 * rm reference to #79480 from spec # Conflicts: # x-pack/plugin/sql/jdbc/src/main/java/org/elasticsearch/xpack/sql/jdbc/JdbcHttpClient.java # x-pack/plugin/sql/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/JdbcConfigurationDataSourceTests.java * fix backport * fix formatting
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
The documentation for the ES JDBC driver states that all timeout system properties (like
query.timeout
) are parsed as seconds. This is currently not the case.E.g. the following program
triggers a request with the body
The same issue probably applies to the other timeout properties.
Also, the properties are treated as ms when read from the connection URL as in
jdbc:es://localhost:9202/?query.timeout=10
.If the queryTimeout is set with
Statement.setQueryTimeout
it is interpreted in seconds as expected by the JDBC specs.The text was updated successfully, but these errors were encountered: