Closed GoogleCodeExporter closed 9 years ago
The codes of the exceptionCaught methods of the "last" upstream handler doesn't
properly handle the client forcibly closing connection before getting the
response.
when something wrong happens during processing the downstream event,ie.
IOException, Netty generally will re-throw the exception to the last handler in
the
upstream pipeline.
I think it's better to check if the channel is still open, before write the exception.
Original comment by popd...@gmail.com
on 24 Jun 2009 at 9:10
Thanks for pointing out the fault with the exceptionCaught; I noticed this last
night,
and am about to commit a fix for it in both protocols.
Unfortunately, I can't seem to reproduce the above issue with spymemcached 2.3.
Is
there something particular about 1.2.8 that requires you to use it?
Original comment by ryan.daum
on 25 Jun 2009 at 12:34
Any client improperly closing the connection will cause this problem, I think.
Actually I'm using spymemcached 2.3.1, and I also met it. The attached file has
some
detailed exception.
Original comment by popd...@gmail.com
on 25 Jun 2009 at 7:25
Attachments:
I need to talk to some netty folks about the right way of handling this. If you
checkout from the head of hg you'll
see I added checks for open channel in the response encoders, but I still seem
to run into occasional problems
with being unable to write to the connection after it has been closed. Any
ideas?
Original comment by ryan.daum
on 25 Jun 2009 at 1:03
Original comment by ryan.daum
on 2 Jul 2009 at 2:02
ryan.daum:
I'll gladly test any fixes if/when you get around to this issue :)
Original comment by kap4...@gmail.com
on 2 Jul 2009 at 3:32
I've actually committed a couple changes. Feel free to test with any examples
you have.
If you have reproducible failures, I'd like to get them into the integration
test.
Original comment by ryan.daum
on 2 Jul 2009 at 3:34
What I've found is that when you use spymemcached to do that simple set-then-get
test, the get may return null because the set may have not completed yet.
Remember;
"setting" data is asynchronous in spymemcached (which internally batches
commands),
whereas "getting" data is synchronous.
If you use the code like the following then a set-then-get test should succeed
every
time (it essentially makes the "set" synchronous):
boolean added = false;
Future<Boolean> addedFuture = client.set(key, expiryTimeInS, value);
try {
added = addedFuture.get();
}
catch (Exception e) { // Something happened, "set" failed.
added = false;
}
if (added) {
client.get(key);
}
Original comment by daryl.be...@gmail.com
on 18 Aug 2009 at 7:50
Interesting, I wasn't aware that all sets in spymemcached were asynchronous, I
thought
only the async series of ops were.
I've committed and pushed changes to the integration test to always wait on the
future
before proceeding.
Original comment by ryan.daum
on 18 Aug 2009 at 8:18
Original comment by ryan.daum
on 18 Aug 2009 at 8:20
Original issue reported on code.google.com by
kap4...@gmail.com
on 23 Jun 2009 at 6:34