-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Akka.Remote socket leak fixes #3764
Merged
Merged
Changes from 29 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
f7f118e
cleaning up comments and code
Aaronontheweb 66efd08
cleaned up some EndpointManager code
Aaronontheweb 1458101
working on porting relevant spec
Aaronontheweb 58f0252
adding some missing test methods to RemotingSpec
Aaronontheweb 31cf147
completed port of Properly_quarantine_stashed_inbound_connections
Aaronontheweb eb05ef3
fixed endpoint manager issue
Aaronontheweb 43d15aa
fixed issues with ActionHandleEventListener
Aaronontheweb b3a36e1
fixed NRE
Aaronontheweb b9ef45c
porting https://github.com/akka/akka/pull/23617
Aaronontheweb f398de5
still working on updating EndpointRegistry
Aaronontheweb 8870fa8
endpoint manager clean-up
Aaronontheweb dcfe3b2
finished cleaning up EndpointRegistry
Aaronontheweb 357feb8
more EndpointManager cleanup
Aaronontheweb 4cf89d3
modified AssociationHandle to allow explicit DEBUG logging of disasso…
Aaronontheweb 6febaff
final pass of EndpointManager updates from https://github.com/akka/ak…
Aaronontheweb 2155edc
fixed EndpointRegistrySpec
Aaronontheweb a625bf0
fixed issue with EndpointRegistry quarantine management
Aaronontheweb 028aec2
updated the reliable delivery supervisor
Aaronontheweb 0529add
cleaned up some remote metrics code
Aaronontheweb b5eb888
tidying up
Aaronontheweb 82a7076
added additional spec
Aaronontheweb fba4e11
stashing work
Aaronontheweb d094fcf
adding connect handshake timeout
Aaronontheweb ca60831
working on updating ProtocolStateActors
Aaronontheweb 81e960d
WIP
Aaronontheweb f52847c
finished most AkkaProtocolStateActor ports
Aaronontheweb 8835426
fixed bug when handling inbound associations
Aaronontheweb aadec2a
cleaning up AkkaProtocolState actors
Aaronontheweb 1731bb5
may have found the source of the leak
Aaronontheweb 74351cd
fixed minor spelling error
Aaronontheweb a322904
removed debug logging
Aaronontheweb 3a81b86
Merge branch 'dev' into fix-socket-leak
Aaronontheweb 7a8643b
added hack to work around association issues
Aaronontheweb d3d1576
porting over OutboundConnection timeout spec
Aaronontheweb 26d6683
ported InboundTimeout spec
Aaronontheweb 32de3cd
approved new Akka.Remote API additions
Aaronontheweb 60e84b5
removed TransportAdapter hack and cleaned up RemotingSpecs
Aaronontheweb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,15 +8,14 @@ | |
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using Akka.Actor; | ||
using Akka.Actor.Internal; | ||
using Akka.Remote.Transport.DotNetty; | ||
using Akka.TestKit; | ||
using Akka.Util.Internal; | ||
using Xunit; | ||
using System.Net; | ||
using Akka.Remote.Transport; | ||
using static Akka.Util.RuntimeDetector; | ||
using FluentAssertions; | ||
|
||
namespace Akka.Remote.Tests | ||
{ | ||
|
@@ -32,7 +31,7 @@ public RemoteConfigSpec():base(@" | |
[Fact] | ||
public void Remoting_should_contain_correct_configuration_values_in_ReferenceConf() | ||
{ | ||
var remoteSettings = ((RemoteActorRefProvider)((ExtendedActorSystem) Sys).Provider).RemoteSettings; | ||
var remoteSettings = RARP.For(Sys).Provider.RemoteSettings; | ||
|
||
Assert.False(remoteSettings.LogReceive); | ||
Assert.False(remoteSettings.LogSend); | ||
|
@@ -80,7 +79,7 @@ public void Remoting_should_contain_correct_configuration_values_in_ReferenceCon | |
[Fact] | ||
public void Remoting_should_be_able_to_parse_AkkaProtocol_related_config_elements() | ||
{ | ||
var settings = new AkkaProtocolSettings(((RemoteActorRefProvider)((ExtendedActorSystem)Sys).Provider).RemoteSettings.Config); | ||
var settings = new AkkaProtocolSettings(RARP.For(Sys).Provider.RemoteSettings.Config); | ||
|
||
Assert.Equal(typeof(DeadlineFailureDetector), Type.GetType(settings.TransportFailureDetectorImplementationClass)); | ||
Assert.Equal(TimeSpan.FromSeconds(4), settings.TransportHeartBeatInterval); | ||
|
@@ -90,10 +89,11 @@ public void Remoting_should_be_able_to_parse_AkkaProtocol_related_config_element | |
[Fact] | ||
public void Remoting_should_contain_correct_heliosTCP_values_in_ReferenceConf() | ||
{ | ||
var c = ((RemoteActorRefProvider)((ActorSystemImpl)Sys).Provider).RemoteSettings.Config.GetConfig("akka.remote.dot-netty.tcp"); | ||
var c = RARP.For(Sys).Provider.RemoteSettings.Config.GetConfig("akka.remote.dot-netty.tcp"); | ||
var s = DotNettyTransportSettings.Create(c); | ||
|
||
Assert.Equal(TimeSpan.FromSeconds(15), s.ConnectTimeout); | ||
s.ConnectTimeout.Should().Be(new AkkaProtocolSettings(RARP.For(Sys).Provider.RemoteSettings.Config).HandshakeTimeout); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Validate the new |
||
Assert.Null(s.WriteBufferHighWaterMark); | ||
Assert.Null(s.WriteBufferLowWaterMark); | ||
Assert.Equal(256000, s.SendBufferSize.Value); | ||
|
@@ -117,7 +117,7 @@ public void Remoting_should_contain_correct_heliosTCP_values_in_ReferenceConf() | |
public void When_remoting_works_in_Mono_ip_enforcement_should_be_defaulted_to_true() | ||
{ | ||
if (!IsMono) return; // skip IF NOT using Mono | ||
var c = ((RemoteActorRefProvider)((ActorSystemImpl)Sys).Provider).RemoteSettings.Config.GetConfig("akka.remote.dot-netty.tcp"); | ||
var c = RARP.For(Sys).Provider.RemoteSettings.Config.GetConfig("akka.remote.dot-netty.tcp"); | ||
var s = DotNettyTransportSettings.Create(c); | ||
|
||
Assert.True(s.EnforceIpFamily); | ||
|
@@ -127,7 +127,7 @@ public void When_remoting_works_in_Mono_ip_enforcement_should_be_defaulted_to_tr | |
public void When_remoting_works_not_in_Mono_ip_enforcement_should_be_defaulted_to_false() | ||
{ | ||
if (IsMono) return; // skip IF using Mono | ||
var c = ((RemoteActorRefProvider)((ActorSystemImpl)Sys).Provider).RemoteSettings.Config.GetConfig("akka.remote.dot-netty.tcp"); | ||
var c = RARP.For(Sys).Provider.RemoteSettings.Config.GetConfig("akka.remote.dot-netty.tcp"); | ||
var s = DotNettyTransportSettings.Create(c); | ||
|
||
Assert.False(s.EnforceIpFamily); | ||
|
@@ -137,7 +137,7 @@ public void When_remoting_works_not_in_Mono_ip_enforcement_should_be_defaulted_t | |
[Fact] | ||
public void Remoting_should_contain_correct_socket_worker_pool_configuration_values_in_ReferenceConf() | ||
{ | ||
var c = ((RemoteActorRefProvider)((ActorSystemImpl)Sys).Provider).RemoteSettings.Config.GetConfig("akka.remote.dot-netty.tcp"); | ||
var c = RARP.For(Sys).Provider.RemoteSettings.Config.GetConfig("akka.remote.dot-netty.tcp"); | ||
|
||
// server-socket-worker-pool | ||
{ | ||
|
@@ -159,7 +159,7 @@ public void Remoting_should_contain_correct_socket_worker_pool_configuration_val | |
[Fact] | ||
public void Remoting_should_contain_correct_hostname_values_in_ReferenceConf() | ||
{ | ||
var c = ((RemoteActorRefProvider)((ActorSystemImpl)Sys).Provider).RemoteSettings.Config.GetConfig("akka.remote.dot-netty.tcp"); | ||
var c = RARP.For(Sys).Provider.RemoteSettings.Config.GetConfig("akka.remote.dot-netty.tcp"); | ||
var s = DotNettyTransportSettings.Create(c); | ||
|
||
//Non-specified hostnames should default to IPAddress.Any | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Validating improved
refuseUid
handling for keeping track of quarantines inside theEndpointRegistry
- per akka/akka#23734