You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Jonathan Ellis (JIRA)" <ji...@apache.org> on 2010/01/25 21:35:34 UTC
[jira] Created: (THRIFT-689) Notify client of recoverable protocol
errors on java server
Notify client of recoverable protocol errors on java server
-----------------------------------------------------------
Key: THRIFT-689
URL: https://issues.apache.org/jira/browse/THRIFT-689
Project: Thrift
Issue Type: Improvement
Components: Compiler (Java)
Reporter: Jonathan Ellis
Assignee: Jonathan Ellis
Attachments: 689.txt
As described in CASSANDRA-711, the java thrift server disconnects clients that send an invalid message (such as a method call with null arguments to required parameters). We should send an exception back to the client instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-689) Notify client of recoverable
protocol errors on java server
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12829656#action_12829656 ]
Jonathan Ellis commented on THRIFT-689:
---------------------------------------
Actually this is already done correctly. validate() is only called after arg reading is complete so we are fine.
> Notify client of recoverable protocol errors on java server
> -----------------------------------------------------------
>
> Key: THRIFT-689
> URL: https://issues.apache.org/jira/browse/THRIFT-689
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (Java)
> Reporter: Jonathan Ellis
> Assignee: Jonathan Ellis
> Attachments: 689.txt
>
>
> As described in CASSANDRA-711, the java thrift server disconnects clients that send an invalid message (such as a method call with null arguments to required parameters). We should send an exception back to the client instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-689) Notify client of recoverable
protocol errors on java server
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12829151#action_12829151 ]
Jonathan Ellis commented on THRIFT-689:
---------------------------------------
Good catch. It will take a bit more work to make sure we leave the connection in a state where we can receive the next command, if any.
(Unfortunately the "easy" way of just sending an error, then closing the connection, won't work reliably; leaving data unread on the server before closing will trigger a reset on the client end.)
> Notify client of recoverable protocol errors on java server
> -----------------------------------------------------------
>
> Key: THRIFT-689
> URL: https://issues.apache.org/jira/browse/THRIFT-689
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (Java)
> Reporter: Jonathan Ellis
> Assignee: Jonathan Ellis
> Attachments: 689.txt
>
>
> As described in CASSANDRA-711, the java thrift server disconnects clients that send an invalid message (such as a method call with null arguments to required parameters). We should send an exception back to the client instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-689) Notify client of recoverable
protocol errors on java server
Posted by "David Reiss (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12829671#action_12829671 ]
David Reiss commented on THRIFT-689:
------------------------------------
It's before readMessageEnd, though. The latter is a no-op with TBinaryProtocol and TCompactProtocol, but not with TJSONProtocol (or possible future protocols).
> Notify client of recoverable protocol errors on java server
> -----------------------------------------------------------
>
> Key: THRIFT-689
> URL: https://issues.apache.org/jira/browse/THRIFT-689
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (Java)
> Reporter: Jonathan Ellis
> Assignee: Jonathan Ellis
> Attachments: 689.txt
>
>
> As described in CASSANDRA-711, the java thrift server disconnects clients that send an invalid message (such as a method call with null arguments to required parameters). We should send an exception back to the client instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-689) Notify client of recoverable
protocol errors on java server
Posted by "David Reiss (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12832283#action_12832283 ]
David Reiss commented on THRIFT-689:
------------------------------------
This is probably fine. It might get a little kooky if a mysterious new protocol threw a ProtocolException before reading the structure was complete, and had a nontrivial readMessageEnd.
> Notify client of recoverable protocol errors on java server
> -----------------------------------------------------------
>
> Key: THRIFT-689
> URL: https://issues.apache.org/jira/browse/THRIFT-689
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (Java)
> Reporter: Jonathan Ellis
> Assignee: Jonathan Ellis
> Attachments: 689.txt, 689.txt
>
>
> As described in CASSANDRA-711, the java thrift server disconnects clients that send an invalid message (such as a method call with null arguments to required parameters). We should send an exception back to the client instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-689) Notify client of recoverable
protocol errors on java server
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12828866#action_12828866 ]
Jonathan Ellis commented on THRIFT-689:
---------------------------------------
It's been a week; do you need anything else for this patch?
> Notify client of recoverable protocol errors on java server
> -----------------------------------------------------------
>
> Key: THRIFT-689
> URL: https://issues.apache.org/jira/browse/THRIFT-689
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (Java)
> Reporter: Jonathan Ellis
> Assignee: Jonathan Ellis
> Attachments: 689.txt
>
>
> As described in CASSANDRA-711, the java thrift server disconnects clients that send an invalid message (such as a method call with null arguments to required parameters). We should send an exception back to the client instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (THRIFT-689) Notify client of recoverable protocol
errors on java server
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-689?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis updated THRIFT-689:
----------------------------------
Attachment: 689.txt
following the reasoning in THRIFT-378, we add a TApplicationException.PROTOCOL_ERROR field and use that to relay the protocol problem, since TApplicationException is the only exception class clients know how to read from the server.
> Notify client of recoverable protocol errors on java server
> -----------------------------------------------------------
>
> Key: THRIFT-689
> URL: https://issues.apache.org/jira/browse/THRIFT-689
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (Java)
> Reporter: Jonathan Ellis
> Assignee: Jonathan Ellis
> Attachments: 689.txt
>
>
> As described in CASSANDRA-711, the java thrift server disconnects clients that send an invalid message (such as a method call with null arguments to required parameters). We should send an exception back to the client instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (THRIFT-689) Notify client of recoverable protocol
errors on java server
Posted by "Stu Hood (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-689?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stu Hood updated THRIFT-689:
----------------------------
Attachment: 689.txt
Here is a revised version of Jonathan's patch which ensures that readMessageEnd is called in the exceptional case as well.
> Notify client of recoverable protocol errors on java server
> -----------------------------------------------------------
>
> Key: THRIFT-689
> URL: https://issues.apache.org/jira/browse/THRIFT-689
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (Java)
> Reporter: Jonathan Ellis
> Assignee: Jonathan Ellis
> Attachments: 689.txt, 689.txt
>
>
> As described in CASSANDRA-711, the java thrift server disconnects clients that send an invalid message (such as a method call with null arguments to required parameters). We should send an exception back to the client instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-689) Notify client of recoverable
protocol errors on java server
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12805208#action_12805208 ]
Bryan Duxbury commented on THRIFT-689:
--------------------------------------
If it applies cleanly and the tests still pass, sounds good to me.
> Notify client of recoverable protocol errors on java server
> -----------------------------------------------------------
>
> Key: THRIFT-689
> URL: https://issues.apache.org/jira/browse/THRIFT-689
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (Java)
> Reporter: Jonathan Ellis
> Assignee: Jonathan Ellis
> Attachments: 689.txt
>
>
> As described in CASSANDRA-711, the java thrift server disconnects clients that send an invalid message (such as a method call with null arguments to required parameters). We should send an exception back to the client instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-689) Notify client of recoverable
protocol errors on java server
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12839672#action_12839672 ]
Jonathan Ellis commented on THRIFT-689:
---------------------------------------
Thanks Bryan, David, Todd!
> Notify client of recoverable protocol errors on java server
> -----------------------------------------------------------
>
> Key: THRIFT-689
> URL: https://issues.apache.org/jira/browse/THRIFT-689
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (Java)
> Reporter: Jonathan Ellis
> Assignee: Jonathan Ellis
> Attachments: 689.txt, 689.txt
>
>
> As described in CASSANDRA-711, the java thrift server disconnects clients that send an invalid message (such as a method call with null arguments to required parameters). We should send an exception back to the client instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-689) Notify client of recoverable
protocol errors on java server
Posted by "David Reiss (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12804699#action_12804699 ]
David Reiss commented on THRIFT-689:
------------------------------------
Looks okay to me. Bryan?
> Notify client of recoverable protocol errors on java server
> -----------------------------------------------------------
>
> Key: THRIFT-689
> URL: https://issues.apache.org/jira/browse/THRIFT-689
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (Java)
> Reporter: Jonathan Ellis
> Assignee: Jonathan Ellis
> Attachments: 689.txt
>
>
> As described in CASSANDRA-711, the java thrift server disconnects clients that send an invalid message (such as a method call with null arguments to required parameters). We should send an exception back to the client instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-689) Notify client of recoverable
protocol errors on java server
Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12829148#action_12829148 ]
Todd Lipcon commented on THRIFT-689:
------------------------------------
Just looked over the patch at Jonathan's request.
Here's the issue I see - if it fails to read args, it's likely that the connection is then "out of sync", right? How are we sure that connection is a quiescent state after the failed read, such that we can read a new RPC?
> Notify client of recoverable protocol errors on java server
> -----------------------------------------------------------
>
> Key: THRIFT-689
> URL: https://issues.apache.org/jira/browse/THRIFT-689
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (Java)
> Reporter: Jonathan Ellis
> Assignee: Jonathan Ellis
> Attachments: 689.txt
>
>
> As described in CASSANDRA-711, the java thrift server disconnects clients that send an invalid message (such as a method call with null arguments to required parameters). We should send an exception back to the client instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.