Skip to content

Commit

Permalink
Remove unhealthy pump (#12691)
Browse files Browse the repository at this point in the history
* Up version to 4.2.1 for stress testing pipeline

* Remove pump if not at running or not opening states.
  • Loading branch information
serkantkaraca authored and prmathur-microsoft committed Jul 8, 2020
1 parent 779c19a commit 8d84b36
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ async Task CheckAndAddPumpAsync(string partitionId, Lease lease)
if (this.partitionPumps.TryGetValue(partitionId, out capturedPump))
{
// There already is a pump. Make sure the pump is working and replace the lease.
if (capturedPump.PumpStatus == PartitionPumpStatus.Errored || capturedPump.IsClosing)
if (capturedPump.PumpStatus != PartitionPumpStatus.Running && capturedPump.PumpStatus != PartitionPumpStatus.Opening)
{
// The existing pump is bad. Remove it.
await TryRemovePumpAsync(partitionId, CloseReason.Shutdown).ConfigureAwait(false);
Expand Down

0 comments on commit 8d84b36

Please sign in to comment.