Skip to content

Conversation

@digital2real
Copy link
Contributor

This changes are trying to complete the retry logic in order to increase the tolerance to a temporary unavailability of a redis cluster.

(Sorry for previous PR #731 on main)

@digital2real digital2real force-pushed the handle_rediscluster_temporarily_unavailable branch from 82b1826 to 6f6c785 Compare January 6, 2022 00:57
@tillkruss
Copy link
Member

No worries.

@nrk Any input on this?

@digital2real
Copy link
Contributor Author

Hi,
@tillkruss , @nrk do you have any comment/update on this?

1 similar comment
@digital2real
Copy link
Contributor Author

Hi,
@tillkruss , @nrk do you have any comment/update on this?

@tillkruss
Copy link
Member

@digital2real Danielle seems MIA. Can you add unit tests for your changes that cover all new scenarios?

}

++$retries;
sleep(2^$retries);
Copy link
Member

Choose a reason for hiding this comment

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

Indentation seems off.

{
$failure = false;

$retries= 0 ;
Copy link
Member

Choose a reason for hiding this comment

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

Needs formatting.

$connection->disconnect();

$this->remove($connection);
if (is_a($response, '\\Predis\\Response\\Error')){
Copy link
Member

Choose a reason for hiding this comment

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

Use instanceof please.

throw new ServerException($message) ;
}
}
} catch (ConnectionException|ServerException $exception) {
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this syntax is compatible with olde PHP versions.

@tillkruss
Copy link
Member

Feel free to re-submit to the 2.0 main branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants