Skip to content
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

SBR fix & update #5147

Merged
merged 8 commits into from
Aug 3, 2021
Merged

SBR fix & update #5147

merged 8 commits into from
Aug 3, 2021

Conversation

zbynek001
Copy link
Contributor

fix Become after acquire lease

Updated:

@Aaronontheweb Aaronontheweb self-requested a review July 19, 2021 14:50
@Aaronontheweb Aaronontheweb added this to the 1.4.22 milestone Jul 19, 2021
@Aaronontheweb
Copy link
Member

Might take me a bit longer to get to reviewing this one, but I will do my best!

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

using Akka.Event;
using Akka.TestKit;
using Akka.TestKit.Xunit2;
using Akka.Util;

namespace Akka.Cluster.Tools.Tests
namespace Akka.Coordination.Tests
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of the changes in this PR are due to moving this file around, so this PR is actually simpler than it appears.

public LeaseMajoritySettings(string leaseImplementation, System.TimeSpan acquireLeaseDelayForMinority, string role, string leaseName) { }
public LeaseMajoritySettings(string leaseImplementation, System.TimeSpan acquireLeaseDelayForMinority, System.TimeSpan releaseAfter, string role, string leaseName) { }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

}

protected DownAllIndirectlyConnected5NodeSpec(DownAllIndirectlyConnected5NodeSpecConfig config)
: base(config, typeof(DownAllIndirectlyConnected5NodeSpec))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MNTR constructors and config all look fine

{
AwaitAssert(() =>
{
cluster.State.Members.Select(i => i.Address).Should().BeEquivalentTo(Node(_config.Node1).Address);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So all of the nodes that have at least one broken connection are downed...

{
cluster.State.Unreachable.Select(i => i.Address).Should().BeEquivalentTo(new[] { _config.Node1, _config.Node2, _config.Node3 }.Select(i => Node(i).Address));
}, _config.Node4, _config.Node5);
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The partitions here make sense [1,2,3] and [4.5]

// now it should have been unstable for more than 17 seconds

// all downed
AwaitCondition(() => cluster.IsTerminated, max: TimeSpan.FromSeconds(15));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense

{
AwaitAssert(() =>
{
Cluster.State.Members.Count.Should().Be(3);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nodes that couldn't acquire the Lease have been downed here

@@ -2639,7 +2639,7 @@ public void AssertLatestGossip()
public void PublishMembershipState()
{
if (_cluster.Settings.VerboseGossipReceivedLogging)
_log.Debug("Cluster Node [{0}] - New gossip published [{0}]", SelfUniqueAddress, _membershipState.LatestGossip);
_log.Debug("Cluster Node [{0}] - New gossip published [{1}]", SelfUniqueAddress, _membershipState.LatestGossip);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch

@Aaronontheweb Aaronontheweb added akka-cluster akka-coordination Akka.Coordination package updates and materials api-change labels Aug 2, 2021
@Aaronontheweb Aaronontheweb enabled auto-merge (squash) August 2, 2021 20:47
@Aaronontheweb Aaronontheweb merged commit e873ecb into akkadotnet:dev Aug 3, 2021
@zbynek001 zbynek001 deleted the sbr-update branch August 3, 2021 13:48
This was referenced Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
akka-cluster akka-coordination Akka.Coordination package updates and materials api-change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants