[
https://issues.apache.org/jira/browse/CASSANDRA-705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12803108#action_12803108
]
Jonathan Ellis commented on CASSANDRA-705:
------------------------------------------
Jun:
Brandon's tests showed throughput about the same, and latency somewhat better
with this patchset. The code is, as predicted, significantly simpler and more
concise.
Jaakko:
(1) sure, but we know the exception is possible and can deal with it cleanly.
Are you objecting on the grounds of aesthetics?
(2) ditto -- note that throttling reconnect attempts to once per 100ms deals
with performance issues fine, in practice
(3) yes, it is probably better to make the thread-per-connection persistent in
the pool class and handle the connect retry. but at some point blocking is
necessary (if FD hasn't kicked in) because OOMing from queuing up messages w/
no bound is Bad with either nio or blocking (CASSANDRA-685)
(4) at some level this is a possibility w/ any code using TCP, but the
queue/executor design (where a message that causes an exception merely causes
the executor to continue to the next -- here, the IncomingTcpConnection thread
reads and enqueues onto the MessageDeserialization executor, which in turn
enqueues onto the correct message Stage) seems to deal with this fine in
practice. So don't write code that loops infinitely and you are ok...
extending that pattern to Gossip doesn't seem like a big deal to me. Am I
missing something?
> explore replacing socket nio with blocking io
> ---------------------------------------------
>
> Key: CASSANDRA-705
> URL: https://issues.apache.org/jira/browse/CASSANDRA-705
> Project: Cassandra
> Issue Type: Task
> Components: Core
> Reporter: Jonathan Ellis
> Assignee: Jonathan Ellis
> Priority: Minor
> Fix For: 0.6
>
> Attachments:
> 0001-make-shutdown-non-reentrant-and-make-MS-a-true-singlet.txt,
> 0002-replace-tcp-socket-reads-w-blocking-i-o.txt,
> 0003-replace-tcp-writes-w-blocking-i-o.txt,
> 0004-implement-streaming-w-blocking-io.txt,
> 0005-convert-gossip-to-use-tcp.-this-finishes-the-removal-o.txt,
> 0006-handle-node-failure.patch, 0007-simplify-header-code.patch,
> 0008-fix-streaming.patch
>
>
> MessagingService's nonblocking io has been a source of bugs both in our code
> and in the JVM in every release of Cassandra. Time to explore moving to
> blocking i/o, which is simpler, more robust (in terms of the JVM
> implementation), and possibly more performant as well
> (http://paultyma.blogspot.com/2008/03/writing-java-multithreaded-servers.html).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.