ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Ozerov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-5620) Meaningful error codes and types of exceptions for SQL operations
Date Tue, 05 Sep 2017 11:33:00 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-5620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16153506#comment-16153506
] 

Vladimir Ozerov commented on IGNITE-5620:
-----------------------------------------

[~al.psc], my comments:
1) We should not propagate H2 errors, as this is implementation detail rather than protocol.
We should convert H2 error codes to our error codes
2) Insufficient tests. I would expect 3-4x more test cases to cover all cases.
3) For the moment we should propagate only {{XX000}} codes. More specific error codes are
only allowed if they defined in SQLSTATE standard explicitly
4) JDBC part is not implemented. First, {{08}} code is not about H2 connection problems, but
about connection to Ignite node. Second, all exceptions thrown on JDBC side should have proper
error codes, which is not the case now. 
5) We do not need to change anything in deprecated driver - it is not supported anymore. Only
{{thin}} and {{jdbc2}} require our attention.
6) {{GridCacheQueryJdbcTask}} - probably you can use {{X.cause()}} to get nested exception
instead of doing it by hand
7) {{JdbcRequestHandler.exceptionToResult}} - no docs
8) {{JdbcResponse.ctor}} - no docs


> Meaningful error codes and types of exceptions for SQL operations 
> ------------------------------------------------------------------
>
>                 Key: IGNITE-5620
>                 URL: https://issues.apache.org/jira/browse/IGNITE-5620
>             Project: Ignite
>          Issue Type: Task
>          Components: sql
>    Affects Versions: 2.0
>            Reporter: Denis Magda
>            Assignee: Alexander Paschenko
>              Labels: usability
>             Fix For: 2.3
>
>
> Presently, SQL engine throws a generic type of exception with custom text in case of
an operation failure. In result, Ignite ODBC driver returns a similar error code (2000) for
different kind of failures.
> For example, error code 2000 is returned for the following
> {code}
> Duplicate key during INSERT [key=CorpcontactcountKey [idHash=1412656257, hash=2004096461,
mdn=919200000000]] 
> {code}
> {code}
> Failed to parse query: INSERT INTO "DG".Corpcontactcount (mdn,contactcount,lastupdatetime)
> values(?,?,?,?) 
> {code}
> {code}
> Wrong value has been set [typeName=Pocsubscrinfo, fieldName=vocoderid, fieldType=short,
assignedValueType=byte] Error Code: 2000
> {code}
> The following has to be done:
> * Create unique types of exceptions for Java whenever applicable.
> * Add {{errorCode}} parameter and method to a generic SQL exception.
> * ODBC and JDBC drivers have to return unique codes based on the exception code or type.
> * All the codes have to be documented on readme.io. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message