Commit Graph

1633 Commits

Author SHA1 Message Date
Simone Bordet 744f9054b3 Fixes #2547 - Review usages of ServerSocket[Channel].accept().
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-05-16 18:40:10 +02:00
Simone Bordet 303deacda2 Fixes #2516 - NPE at SslClientConnectionFactory.newConnection().
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-05-09 09:37:30 +02:00
Joakim Erdfelt 1732ffca51 Updating to version 9.4.11-SNAPSHOT 2018-05-03 11:48:05 -05:00
Joakim Erdfelt daa59876e6 Updating to version 9.4.10.v20180503 2018-05-03 10:55:19 -05:00
Simone Bordet 6224e75862
Issue #2366 - Review HTTP/2 interleaving. (#2379)
* Fixes #2366 - Review HTTP/2 interleaving.

Now using a fairer algorithm that performs multiple generation passes
but without generating all frames for the current entries - it stops
after N passes over all the entries when the number of bytes to
write is large enough.

Using HttpConfiguration.outputBufferSize as the writeThreshold on
the server and a default 32 KiB on the client to stop the generation
after a pass over all the entries.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-04-13 11:50:17 +02:00
Greg Wilkins 426fb955f8 extra debug for #2205
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-04-03 08:59:56 +10:00
Joakim Erdfelt c3cc138a3b Updating to version 9.4.10-SNAPSHOT 2018-03-20 08:25:59 -05:00
Joakim Erdfelt 1f8159b1e4 Updating to version 9.4.9.v20180320 2018-03-20 07:18:24 -05:00
Simone Bordet adeaf77c02 Small optimization to save the allocation of an iterator,
in case the selector has been woken up without selected keys.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-03-20 10:38:53 +01:00
Joakim Erdfelt a107bdd2bb Issue #2226 - SelectChannelEndPoint test cleanup
Applying recommended changes from review.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2018-03-19 17:26:44 -05:00
Joakim Erdfelt a437466996 Issue #2226 - SelectChannelEndPoint test cleanup
Fixing NPE in testcase

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2018-03-19 16:45:01 -05:00
Joakim Erdfelt 1493e57064 Issue #2226 - SelectChannelEndPoint test cleanup
+ New SocketChannelEndPointTest replacement class
  * Is Parameterized for both Normal/Ssl scenarios
  * Builds a new set of connections/selector manager etc
    for each test
  * TestConnection moved to inner static class to not rely
    on test class fields/methods
  * Adding SafeInteger to help track down bad test behavior.

Blocking Read behavior doesn't do what we think, see Exception on CI.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2018-03-19 16:03:16 -05:00
Joakim Erdfelt 423d160f0d Issue #2226 - SelectChannelEndPoint test cleanup
+ Renamed old SocketChannelEndPointTest to
  SocketChannelEndPointOpenCloseTest
+ Moved SelectChannelEndPointSslTest.checkSslEngineBehavior() to
  new SslEngineBehaviorTest as its unrelated to the rest
  of the SelectChannelEndPointTest logic

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2018-03-19 16:01:17 -05:00
Joakim Erdfelt 7c5b49fb7f Issue #2226 - SelectChannelEndPoint test cleanup
+ Renamed SelectChannelEndPointInterestsTest to
  SocketChannelEndPointInterestsTest
+ Merged EndPointTest abstract class into SocketChannelEndPointTest
  as it's only used by that testcase

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2018-03-19 15:04:03 -05:00
Joakim Erdfelt 13224e4ee8 Adding TestTracker to SelectChannelEndPointTest
Hoping that this will reveal the specific circumstances (test order)
that lead to the frequent test failures on CI

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2018-03-19 14:16:49 -05:00
Simone Bordet 7bc5e6e33a Small code cleanup and optimization in dump().
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-03-19 10:43:26 +01:00
Greg Wilkins fc5369a1de simplified idle tests
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-19 11:13:08 +11:00
Greg Wilkins 0b44f47b45 removed extra debug
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-16 09:48:35 +11:00
Greg Wilkins 1da19dc2fd
[WIP!] HTTP Close #1832 (#2338)
* Only close if parser closed and output is shutdown

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* a better possible fix

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* after review

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-15 23:12:58 +11:00
Joakim Erdfelt 358f324ddc
Merge pull request #2335 from eclipse/jetty-9.4.x-issue-2218-windows-livelock
Issue #2218 - Windows Selector Bug
2018-03-15 04:43:33 -05:00
Greg Wilkins c8d6f0a3bb Recursion protection for SSL flush try again #2233
Protecton from recursion in SSL flush try again #2233
This would not be needed if we could make flush iterate when necessary.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-15 10:41:50 +11:00
Joakim Erdfelt 484280bac6 Issue #2218 - Windows Selector Bug
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2018-03-14 17:42:50 -05:00
Greg Wilkins f35bd03810 Speculative fix for #2233
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-13 16:15:28 +11:00
Greg Wilkins be1a011120 more robust test
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-13 14:26:52 +11:00
Greg Wilkins 74f5b9898f simplified testSelectorWakeup #2219
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-13 13:42:35 +11:00
Greg Wilkins cf0b6140fe
Merge pull request #2299 from olamy/feature/available_processors
#2298 Override the processor number with an environment variable
2018-03-08 08:36:52 +11:00
Simone Bordet a3100e0211 Issue #2288 - Cleanup the statistics classes. (#2290)
* Issue #2288 - Cleanup the statistics classes.

Cleaned up code, added Javadocs.
Renamed SampleStatistics.set(long) to record(long).

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>

* toString stddev

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-08 08:35:21 +11:00
olivier lamy 7004aaa538 #2298 Override the processor number with an environment variable
Signed-off-by: olivier lamy <olamy@webtide.com>
2018-03-07 21:02:26 +10:00
Greg Wilkins 5216d07124 Better dump for ManagedSelector
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-07 18:06:57 +11:00
Greg Wilkins bcb9fa3b32
Merge pull request #2257 from lachlan-roberts/jetty-9.4.x-2206-ReferenceEquality
Resolved errorprone ReferenceEquality warnings #2206
2018-03-07 11:11:40 +11:00
Greg Wilkins daeaad7624 improve test timing
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-06 19:03:46 +11:00
Greg Wilkins 2291d12b87 more robust idle test
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-06 15:34:42 +11:00
Greg Wilkins f6d9393bb5 more robust test by avoiding sleep
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-06 14:35:31 +11:00
Lachlan Roberts 020ebde77c found additional ReferenceEquality warnings which have been resolved
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-03-06 14:28:11 +11:00
Joakim Erdfelt 2879d5a5a0
Merge pull request #2277 from eclipse/jetty-9.4.x-2255-notify_ssl_handshake_on_write_failures
Issue #2255 - Notify SSL handshake failures on write failures.
2018-03-02 09:45:38 -06:00
Lachlan Roberts a639ee9275 Resolved errorprone MissingOverride warnings #2206
`@Override` was added to methods which were missing the annotation #2206

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-03-01 13:59:25 +11:00
Simone Bordet 718ac76815 Issue #2255 - Notify SSL handshake failures on write failures.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-02-28 21:32:42 +01:00
Lachlan Roberts 480c0e718a Merge branch 'jetty-9.4.x' into jetty-9.4.x-2206-ReferenceEquality 2018-02-28 16:14:49 +11:00
Lachlan Roberts 0cfc25d4ed Resolved errorprone ReferenceEquality warnings #2206
Objects which inherit or implement an `equals()` method should not be compared with == or !=
When the comparison of references is intentional `@SuppressWarnings("ReferenceEquality")` can be used

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-02-28 14:26:02 +11:00
Simone Bordet f4b82755ad Now also logging the readyOps of the key that has been selected.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-02-27 12:03:36 +01:00
Greg Wilkins 0cb4f5629d
Jetty 9.4.x 1803 proposal 0+2 (#2199)
Merging this PR for #2199 as we currently think it is not worse than previous and the code base is definitely simpler.   While JMH has shown significant benefits for this approach, we have yet been able to demonstrate them in full scale integration tests - however that is likely due to GC and thread pool issues dominating.

A `org.eclipse.jetty.http2.PEC_MODE` System property has been added to allow the EWYK scheduling to be disabled for HTTP/2 if need be.


* Implementation of #1803 proposal 2 - EITHER dispatch type for EWYK
* made code more readable
* increase small threadpools in tests for extra reserved thread
* clean up
* minor code simplifications
* Work in progress to simplify reserved thread pool
* use a single ReservedThreadPool built into the QueuedThreadPool
* fixed javadoc
* removed more old reserved thread references
* disable EWYK for h2
* fixes from review
* use EWYK for HTTP2
* Fixed javadocs, imports and QueuedThreadPool constructors.
* fix javadoc
* EWYK avoid unnecessary pendings
* after review
* fixed merge with jetty-threadpool.xml
* alternate EWYK implementations
* added jetty copyright headers
* Simplified EWYK code after review
* fixed bad merge
* Code cleanups.
* Improved Javadocs for deprecated property "reservedThreads".
* Improved Javadocs for deprecated property "reservedThreads".
* added a system property to enable only PEC for HTTP/2

Signed-off-by: Greg Wilkins <gregw@webtide.com>
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-02-27 14:29:59 +11:00
Greg Wilkins 8bd27cd18a improved or ignored tests #2230
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-02-23 14:52:37 +11:00
Greg Wilkins c751a8b1bb improve fragile tests
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-02-23 08:29:31 +11:00
Greg Wilkins b94d26a720 less fragile tests
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-02-20 10:19:32 +11:00
Greg Wilkins ec51926622 reduce fragility of tests
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-02-19 19:22:32 +11:00
Greg Wilkins ab5fc29cca Jetty 9.4.x 1803 proposal 0 - single ReservedThreadExecutor (#2119)
Issue #1803 - Review usage of scheduling strategies

Use a single ReservedThreadExecutor built into the QueuedThreadPool
via new interface TryExecutor.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-02-08 11:08:48 +01:00
Greg Wilkins f4e37b1adb
Issue #2014 - Unix Socket Client (#2025)
There are still problems with this impl (some client tests ignored) and there is still a work around for the JNR bug 50, however this impl is already much better than the unix socket support that is already in the release.  So will merge for now and put more effort in once there is a JNR fix.

* WIP add unix domain sockets support in HttpClient
* move unix socket client part to unix socket module #2014
* some cleanup #2014
* add missing headers #2014
* add TODO
* UnixSocket client refactor
* cleanup test and pom
* minor changes, use LOG.isDebugEnabled() before using debug method
* add UNIX SOCKET http client test with all other tests, push this to see what happen on Jenkins
* fix some unit tests
* fix more tests
* fix load test
* UnixSocket client
* Demonstrate JNR bug
* Worked around JNR bug 50
* close channel on client side as well
* more details in log
* log file path as well
* #2014 disable test per default as doesn't work on some environement
* Revert "#2014 disable test per default as doesn't work on some environement"
* test only on unix
* Allow test of specific transport(s)
* Move unix socket to /tmp
* move test socket to /tmp
* move test socket to /tmp
* ignore failing tests for now
* fix bean name and possible to use sys prop org.eclipse.jetty.http.client.AbstractTest.Transports with mvn cli
* test isBlank as surefire props is not null
* correctly create tmp file with @Before
* do not delete file
* use /tmp as build directory doesn't seem to work within docker...
* do not delete sock file on client as it is own by the server
* file must not exist when binding unix socket
* #2014 fix license header
* network specific tests assumed
* Fixed to handle null selector keys
* add assume for tests that assume a network connector

Signed-off-by: olivier lamy <olamy@webtide.com>
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-01-13 11:59:47 +01:00
Greg Wilkins de7e3001ef cleanup temp fix for #2046 2018-01-11 17:01:05 +01:00
Greg Wilkins 385ba7d70d Remove graceful handling from ManagedSelector stop #2046
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-01-11 10:29:27 +01:00
Greg Wilkins 7d9f2d7e64 Added info to TimeoutException
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-01-10 21:16:41 +01:00