Cassandra / Pycassa: get_slice () / get_indexed_slice () doesn't work with TApplicationException: Unknown result
When rows of lines from Cassandra through Picassa sometimes make a difference
TApplicationException: get_slice failed: unknown result]
I cannot reproduce this exception, and I cannot find any documentation for this issue. Right now I am running Cassandra as a separate node (for development) and Exception always occurs in a context where there are many concurrent requests happening. I would like to know if the reason for this is something like a performance issue or is related to something else (so I would like to know if it might disappear when more than one node is run in production?).
The Cassandra version is 1.0.7 and the log output is as follows:
17:45:58,253 Thrift transport error occurred during processing of message. org.apache.thrift.transport.TTransportException at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:132) at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84) at org.apache.thrift.transport.TFramedTransport.readFrame(TFramedTransport.java:129) at org.apache.thrift.transport.TFramedTransport.read(TFramedTransport.java:101) at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84) at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:378) at org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:297) at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:204) at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2877) at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:187) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) DEBUG 17:45:58,315 logged out: #<User allow_all groups=>]
source to share
If you are using multiprocessing, pycassa.pool is not multiprocessing safe .
I was getting "TApplicationException: get_slice failed: unknown result" under similar circumstances. I created multiple pycassa.pools, one pool per process, and the problem was resolved.
There is a dedicated page in the documentation to tell us about multiprocessing and pools, but it doesn't list what kind of error you'll get if you're multiprocessing with one pool. I think this is right!
source to share