Trustin Lee
5c27273885
Avoid unnecessary IllegalStateException in ChunkedWriteHandler
...
Motivation:
ChunkedWriteHandler can sometimes fail to write the last chunk of a ChunkedInput due to an I/O error. Subsequently, the ChunkedInput's associated promise is marked as failure and the connection is closed. When the connection is closed, ChunkedWriteHandler attempts to clean up its message queue and to mark their promises as success or failure. However, because the promise of the ChunkedInput, which was consumed completely yet failed to be written, is already marked as failure, the attempt to mark it as success fails, leading a WARN level log.
Modification:
Use trySuccess() instead of setSuccess() so that the attempt to mark a ChunkedInput as success does not raise an exception even if the promise is already done.
Result:
Fixes #2249
2014-02-20 17:14:53 -08:00
Jeff Pinner
d838a07c14
SPDY: remove SPDY/3 support
2014-02-20 15:00:04 -08:00
Norman Maurer
66e2bb1e75
[maven-release-plugin] prepare for next development iteration
2014-02-19 03:41:24 +01:00
Norman Maurer
c466bb803d
[maven-release-plugin] prepare release netty-4.0.16.Final
2014-02-19 03:36:54 +01:00
Norman Maurer
e74b5fc2fa
Fix a regression which could lead to GenericFutureListeners never been notifed. Part of [ #2186 ].
...
This regression was introduced by commit c97f2d2de00ad74835067cb6f5a62cd4651d1161
2014-02-20 15:01:09 +01:00
Trustin Lee
f120b6c390
Fix a bug where HttpObjectAggregator doesn't always produce FullHttpMessage
...
- Fixes #2182
- Always convert an unfull invalid message to a full message
2014-02-19 15:33:42 -08:00
Trustin Lee
00d982994c
Ensure that the last bad chunk is LastHttpChunk
2014-02-19 15:20:48 -08:00
Trustin Lee
3fb65db8d1
HttpObjectDecoder.invalidChunk() should return LastHttpChunk
...
because the decoder will enter 'BAD_MESSAGE' state and will not produce any chunk since then.
2014-02-19 14:59:11 -08:00
Norman Maurer
34e11d2e16
Correctly handle remove from epoll and EPOLLRDHUP. Also fix a bug with removing EPOLLIN and EPOLLOUT
2014-02-19 16:30:24 +01:00
Norman Maurer
01d2f3f141
Ensure native transport is included in all and tarball
2014-02-17 22:44:37 +01:00
Norman Maurer
b2a0a25b8f
Use optimized write and read calls if memoryAddress is present. Part of [ #2239 ]
2014-02-17 21:06:57 +01:00
Norman Maurer
32e28950e1
Move marking ChannelPromise for writes uncancellable to addFlush for keep things simple
2014-02-17 16:14:25 +01:00
Trustin Lee
61bfd46264
Fix an inspector warning
2014-02-17 05:25:58 -08:00
Trustin Lee
ab257b0ac6
Overall clean-up in EpollSocketChannel
...
- Extract writev part from doWrite() for simplicity
- Clearer comments
2014-02-17 05:21:34 -08:00
Norman Maurer
ea73d074f2
[ #2238 ] Fix bug which caused a SIGSEGV when calling remoteAddress() or localAddress()
2014-02-17 11:59:28 +01:00
Norman Maurer
84b537519c
Correctly update the ByteBuffers position on write and writev
2014-02-17 07:30:06 +01:00
Trustin Lee
7f41faeb86
Optimize imports
2014-02-16 11:53:51 -08:00
Trustin Lee
c4936fe9a7
Fix resource leaks in ByteArrayEncoderTest
2014-02-16 11:52:43 -08:00
Norman Maurer
04dab876b6
Use correct writerIndex when read for channel
2014-02-16 20:21:14 +01:00
Norman Maurer
1edca5f8d9
Introduce a native transport for linux using epoll ET
...
This transport use JNI (C) to directly make use of epoll in Edge-Triggered mode for maximal performance on Linux. Beside this it also support using TCP_CORK and produce less GC then the NIO transport using JDK NIO.
It only builds on linux and skip the build if linux is not used. The transport produce a jar which contains all needed .so files for 32bit and 64 bit. The user only need to include the jar as dependency as usually
to make use of it and use the correct classes.
This includes also some cleanup of @trustin
2014-02-15 22:27:43 +01:00
Trustin Lee
f4074a8811
Fix compilation errors introduced by sloppy merge
2014-02-15 11:31:01 -08:00
Trustin Lee
11a235ffe9
Use thread local direct buffer for I/O when the current allocator is unpooled
...
- Allocating and deallocating a direct buffer for I/O is an expensive
operation, so we have to at least have a pool of direct buffers if the
current allocator is not pooled
2014-02-15 11:27:04 -08:00
Trustin Lee
ab1a7b9774
Fix inefficient loop in QueryStringDecoder.decodeComponent()
...
- Fixes #2228
- There's no point of looping until the end of the component if at least one '%' or '+' is found.
2014-02-14 13:27:18 -08:00
Michael Nitschinger
268988378f
Update JMH to 0.3.2
2014-02-14 13:16:22 -08:00
Trustin Lee
b18c8fe688
Determine the default allocator from system property
...
- Add ByteBufAllocator.DEFAULT
- The default allocator is 'unpooled'
2014-02-14 13:05:57 -08:00
Trustin Lee
dd4ed6aa14
Do not warn about Unsafe in Android
2014-02-14 12:07:16 -08:00
Trustin Lee
51829a5706
Fix wiki link
2014-02-14 12:04:28 -08:00
Trustin Lee
1ddf91828d
Do not use String.format() for log message generation
...
- It's slow.
2014-02-13 19:33:36 -08:00
Norman Maurer
69a36b8bea
Prettify exception message
2014-02-13 06:46:51 +01:00
Norman Maurer
62ebe88981
Allow to set IoRatio to 100%
2014-02-12 15:22:39 +01:00
Norman Maurer
80e6f9adf4
Correctly respect isAutoRead() and make it consistent across OIO/NIO
2014-02-11 20:46:46 +01:00
Norman Maurer
7041a9238e
Allow to cancel non-flushed writes
2014-02-11 19:42:49 +01:00
Trustin Lee
d52dc3b740
Do not warn if failed to mark a void promise as success
...
- it's always supposed to fail.
2014-02-10 15:03:46 -08:00
Trustin Lee
96b0a949e1
Make most outbound operations cancellable / More robust promise update
...
- Inspired by #2214 by @normanmaurer
- Call setUncancellable() before performing an outbound operation
- Add safeSetSuccess/Failure() and use them wherever
2014-02-10 14:57:18 -08:00
Trustin Lee
852a7cec77
Make the build not fail in JDK8 until we fix Javadoc
2014-02-10 14:11:38 -08:00
Trustin Lee
041d37e0c8
Make most outbound operations are cancellable
...
- Inspired by #2214
- It actually reduces the chance of trying to marking a cancelled promise as success again, which raises an IllegalStateException.
2014-02-10 14:06:54 -08:00
Trustin Lee
838e80ed6b
Fix external Javadoc url
2014-02-10 13:40:30 -08:00
Trustin Lee
0e71da3082
Fix a bug where DefaultPromise.setUncancellable() returns a wrong value
...
- Fixes #2220 - again
- Missing negation
2014-02-10 11:48:20 -08:00
Trustin Lee
7e0e4c6325
Fix a bug where DefaultPromise.setUncancellable() returns a wrong value
...
- Fixes #2220
- Its Javadoc says it returns true when the promise is done (but not cancelled) or the promise is uncancellable, but it returns false when the promise is done.
2014-02-10 11:40:04 -08:00
Norman Maurer
084db044cd
[ #2219 ] Fix javadocs of HttpObjectAggregator to show correct handler order in pipeline
2014-02-09 17:10:09 +01:00
Trustin Lee
ed4f7305ce
Remove the StringCache option which was removed in JDK8
2014-02-08 11:14:16 -08:00
Trustin Lee
c8ec5be842
Remove a version clause added by mistake
2014-02-08 11:07:58 -08:00
Trustin Lee
aeeb2e7bac
Fix a build error related with NPN version and JDK8
2014-02-08 10:48:42 -08:00
Norman Maurer
c93337b01a
[ #2212 ] Skip autobahntestsuite when using -DskipTests
2014-02-08 19:01:14 +01:00
Trustin Lee
50b862349c
Fix a build error
...
which occurred when -Pcoverage was not specified
2014-02-08 09:12:56 -08:00
Trustin Lee
e592d06364
Fix the compilation error in ConcurrentHashMapV8 + JDK8
2014-02-08 08:56:17 -08:00
Trustin Lee
060eed9e80
Prefer interface to implementation in type declaration
...
This fixes the build failure with JDK 8 due to animal sniffer error
2014-02-08 08:50:27 -08:00
Trustin Lee
21c4aaa12b
Add 'coverage' profile that generates the test coverage report
2014-02-08 08:43:04 -08:00
Norman Maurer
87602fde25
[ #2215 ] DefaultChannelHandlerContext tasks needs to be volatile to ensure every thread only see full initialized instances
2014-02-08 10:33:44 +01:00
Trustin Lee
87b853c60d
Use smaller number of boss threads in the example
...
.. because usually there's no need to use many boss threads.
2014-02-07 14:43:07 -08:00