You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Doug Cutting (JIRA)" <ji...@apache.org> on 2010/03/03 02:07:27 UTC

[jira] Created: (AVRO-447) document protocol system error

document protocol system error
------------------------------

                 Key: AVRO-447
                 URL: https://issues.apache.org/jira/browse/AVRO-447
             Project: Avro
          Issue Type: Bug
          Components: spec
    Affects Versions: 1.3.0
            Reporter: Doug Cutting


Currently Java internally adds a type at the start of each protocol message's error list for system errors.  This is used when an exception is encountered on the server while executing an RPC that does not match one of the messages declared errors.  The type is "string", so it will never conflict with another error, since all other errors are defined as records.

For example, if a protocol has a message like:

{code}
"foo": {
  "request": [],
  "response": "null",
  "errors": ["MyError"]
}
{code}

Then errors are written and read with the schema ["string", "MyError"], although that schema never appears publicly.

This should either be documented or changed.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AVRO-447) document protocol system error

Posted by "Jeff Hodges (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AVRO-447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12853534#action_12853534 ] 

Jeff Hodges commented on AVRO-447:
----------------------------------

For those interested, the current ruby implementation only has the string as a valid type if there is no value given for the errors key.  That is:

{code}
writers_schema = remote_message_schema.errors || SYSTEM_ERROR_SCHEMA
readers_schema = local_message_schema.errors || SYSTEM_ERROR_SCHEMA
{code}

I will be changing this to be inclusive in a new ticket.

> document protocol system error
> ------------------------------
>
>                 Key: AVRO-447
>                 URL: https://issues.apache.org/jira/browse/AVRO-447
>             Project: Avro
>          Issue Type: Bug
>          Components: spec
>    Affects Versions: 1.3.0
>            Reporter: Doug Cutting
>            Assignee: Doug Cutting
>
> Currently Java internally adds a type at the start of each protocol message's error list for system errors.  This is used when an exception is encountered on the server while executing an RPC that does not match one of the messages declared errors.  The type is "string", so it will never conflict with another error, since all other errors are defined as records.
> For example, if a protocol has a message like:
> {code}
> "foo": {
>   "request": [],
>   "response": "null",
>   "errors": ["MyError"]
> }
> {code}
> Then errors are written and read with the schema ["string", "MyError"], although that schema never appears publicly.
> This should either be documented or changed.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AVRO-447) document protocol system error

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AVRO-447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12840414#action_12840414 ] 

Doug Cutting commented on AVRO-447:
-----------------------------------

One alternative is, rather than putting the system error at the front of the union, to have three types of responses: normal (value is "response" schema), error (value is "error" schema) or system_error (value is "string").  This would involve changing the "error flag" boolean into an enum.  This would be an incompatible change, but I doubt much depends on this currently undocumented behaviour.  Rather I suspect that errors do not currently operate correctly between java and other languages.

> document protocol system error
> ------------------------------
>
>                 Key: AVRO-447
>                 URL: https://issues.apache.org/jira/browse/AVRO-447
>             Project: Avro
>          Issue Type: Bug
>          Components: spec
>    Affects Versions: 1.3.0
>            Reporter: Doug Cutting
>
> Currently Java internally adds a type at the start of each protocol message's error list for system errors.  This is used when an exception is encountered on the server while executing an RPC that does not match one of the messages declared errors.  The type is "string", so it will never conflict with another error, since all other errors are defined as records.
> For example, if a protocol has a message like:
> {code}
> "foo": {
>   "request": [],
>   "response": "null",
>   "errors": ["MyError"]
> }
> {code}
> Then errors are written and read with the schema ["string", "MyError"], although that schema never appears publicly.
> This should either be documented or changed.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (AVRO-447) document protocol system error

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Doug Cutting reassigned AVRO-447:
---------------------------------

    Assignee: Doug Cutting

> document protocol system error
> ------------------------------
>
>                 Key: AVRO-447
>                 URL: https://issues.apache.org/jira/browse/AVRO-447
>             Project: Avro
>          Issue Type: Bug
>          Components: spec
>    Affects Versions: 1.3.0
>            Reporter: Doug Cutting
>            Assignee: Doug Cutting
>
> Currently Java internally adds a type at the start of each protocol message's error list for system errors.  This is used when an exception is encountered on the server while executing an RPC that does not match one of the messages declared errors.  The type is "string", so it will never conflict with another error, since all other errors are defined as records.
> For example, if a protocol has a message like:
> {code}
> "foo": {
>   "request": [],
>   "response": "null",
>   "errors": ["MyError"]
> }
> {code}
> Then errors are written and read with the schema ["string", "MyError"], although that schema never appears publicly.
> This should either be documented or changed.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.