You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Apache (JIRA)" <ji...@apache.org> on 2010/07/29 00:04:16 UTC
[jira] Created: (CASSANDRA-1331) Any request after a
TApplicationException hangs
Any request after a TApplicationException hangs
-----------------------------------------------
Key: CASSANDRA-1331
URL: https://issues.apache.org/jira/browse/CASSANDRA-1331
Project: Cassandra
Issue Type: Bug
Components: Core
Affects Versions: 0.6.3
Reporter: Apache
Observed that the design of request validation can return without consuming the complete request. The remnant is then read by the next request and produces a large read size.
readMessageBegin size: 134218752
Sample test case in python:
from cassandra.ttypes import *
from cassandra import Cassandra
from thrift import Thrift
from thrift.transport import TTransport
from thrift.transport import TSocket
from thrift.protocol.TBinaryProtocol import TBinaryProtocolAccelerated
socket = TSocket.TSocket("127.0.0.1", 9160)
transport = TTransport.TBufferedTransport(socket)
protocol = TBinaryProtocolAccelerated(transport)
client = Cassandra.Client(protocol)
transport.open()
client.transport = transport
# don't specify a column_family to force a TApplicationException
parent = ColumnParent()
try:
client.get_count("ignore_keyspace", "ignore_key", parent, 1)
print "ERROR: we didn't see the problem"
except TApplicationException as e:
message = "Required field 'column_family' was not present!"
if e.message.startswith(message):
print "OK, we got the error we were looking for."
print "The server input buffer was only partially read,"
print " up to the validation error, so our next request"
print " will start reading the stale data causing a hang."
print "hanging..."
client.get_count("ignore_keyspace", "ignore_key", parent, 1)
client.transport.close()
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CASSANDRA-1331) Any request after a
TApplicationException hangs
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis updated CASSANDRA-1331:
--------------------------------------
Affects Version/s: (was: 0.6.3)
Priority: Minor (was: Major)
this is a thrift bug, but I don't see what is causing it.
if you look at the generated thrift code sending the error (Cassandra.get_count_args.read), validate() is not called until all the data has been read. The only thing remaining should be the thrift "footer", and if you look at Cassandra.get_count.process which is calling read(), it calls readMessageEnd before returning the ApplicationError as well.
> Any request after a TApplicationException hangs
> -----------------------------------------------
>
> Key: CASSANDRA-1331
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1331
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Reporter: Apache
> Priority: Minor
>
> Observed that the design of request validation can return without consuming the complete request. The remnant is then read by the next request and produces a large read size.
> readMessageBegin size: 134218752
> Sample test case in python:
> from cassandra.ttypes import *
> from cassandra import Cassandra
> from thrift import Thrift
> from thrift.transport import TTransport
> from thrift.transport import TSocket
> from thrift.protocol.TBinaryProtocol import TBinaryProtocolAccelerated
> socket = TSocket.TSocket("127.0.0.1", 9160)
> transport = TTransport.TBufferedTransport(socket)
> protocol = TBinaryProtocolAccelerated(transport)
> client = Cassandra.Client(protocol)
> transport.open()
> client.transport = transport
> # don't specify a column_family to force a TApplicationException
> parent = ColumnParent()
> try:
> client.get_count("ignore_keyspace", "ignore_key", parent, 1)
> print "ERROR: we didn't see the problem"
> except TApplicationException as e:
> message = "Required field 'column_family' was not present!"
> if e.message.startswith(message):
> print "OK, we got the error we were looking for."
> print "The server input buffer was only partially read,"
> print " up to the validation error, so our next request"
> print " will start reading the stale data causing a hang."
> print "hanging..."
> client.get_count("ignore_keyspace", "ignore_key", parent, 1)
> client.transport.close()
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.