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

Limit max number of expired leases acquired #11062

Conversation

serkantkaraca
Copy link
Member

@serkantkaraca serkantkaraca commented Apr 6, 2020

  • Limiting max number of expired leases acquired so that one host alone won't take over all leases.
  • Release lease on shutdown before attempting to close the underlying receiver.
  • Move to storage client set timeouts on LeaseStoreExistsAsync and CreateLeaseStoreIfNotExistsAsync to avoid timeouts during lease store initialization.
  • Adding test for skipping start of stream checkpointing
  • Reducing receive timeouts to shorten test run times.
  • Move EPH tests from base class to child class to avoid running same tests twice; once for base class and once for child class.

[Fact]
[LiveTest]
[DisplayTestMethodName]
public async Task DontCheckpointStartOfStream()
Copy link
Member Author

Choose a reason for hiding this comment

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

public async Task DontCheckpointStartOfStream() [](start = 8, length = 47)

This is the new test added in this PR, rest is move from base class to child class.

@@ -249,7 +253,7 @@ async Task RunAsync()
try
{
allLeases[subjectLease.PartitionId] = subjectLease;
if (subjectLease.Owner == this.host.HostName)
if (subjectLease.Owner == this.host.HostName && !(await subjectLease.IsExpired()))
Copy link
Contributor

@JamesBirdsall JamesBirdsall Apr 6, 2020

Choose a reason for hiding this comment

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

Nit: ConfigureAwait? #Resolved

@serkantkaraca
Copy link
Member Author

Thanks James!

@serkantkaraca serkantkaraca merged commit 5427c37 into Azure:master Apr 6, 2020
@serkantkaraca serkantkaraca deleted the EventProcessorHost.LimitMaxNumberOfOwnedLeases branch August 12, 2020 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants