[ 
https://issues.apache.org/jira/browse/CASSANDRA-1057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873067#action_12873067
 ] 

Kenny commented on CASSANDRA-1057:
----------------------------------

Not really. I sent a patch to the thrift-user list, but didn't receive a reply 
on it. I also cloned the thrift repo on github and was working on this patch:

http://github.com/KenMacD/thrift/commit/0ac9a2dc17326411212a02b201bc7ef969cea9c7

I haven't had a lot of time to look at it lately though. I was going to look at 
if it made sense to add builder to the other servers. 
Thrift 0.3 is about to come out, so maybe I'll see if I can get them to include 
a fix before 0.4. 

As a workaround in another project I work on I copied the TThreadPoolServer and 
was using my own version. You can see my workaround @:

http://github.com/ted/ted/commit/f4784c7adee2ff02bab51f529b190a4b16066e7c

This TThreadPoolServer takes an ExecutorService in which I override the 
afterExecute() to call my logout() on the thread. Seems to work well.


> Login information stored in threads may be reused.
> --------------------------------------------------
>
>                 Key: CASSANDRA-1057
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1057
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.6
>            Reporter: Kenny
>            Priority: Minor
>             Fix For: 0.6.3
>
>
> CassandraServer stores the login information in a ThreadLocal<AccessLevel>.
> CassandraDaemon starts the server with 64 threads. When the first 64 clients 
> connect they should get their own thread, but after that threads will be 
> reused.
> In a quick test I created a Server with 5 threads, and a 
> ThreadLocal<Integer>, and the value is seen by new clients connecting.
> Thrift doesn't destroy the threads when a client disconnects. Maybe an option 
> in Thrift would make more sense to make this method usable.

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

Reply via email to