cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache (JIRA)" <j...@apache.org>
Subject [jira] Created: (CASSANDRA-1331) Any request after a TApplicationException hangs
Date Wed, 28 Jul 2010 22:04:16 GMT
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.


Mime
View raw message