-
Notifications
You must be signed in to change notification settings - Fork 20
Hrcpp 286/failover #232
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
Hrcpp 286/failover #232
Conversation
47f720f to
96de864
Compare
| throw; // Rethrow. The exception is rethrown as const! | ||
| void logErrorAndThrowExceptionIfNeeded(int& retryCount, const HotRodClientException& e) { | ||
| if (retryCount >= transportFactory->getMaxRetries() - 1) { | ||
| if (transportFactory->switchOnFailoverCluster() == ClusterStatus::SWITCHED) |
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.
Formatting seems to be wrong here..
|
Only some really small formatting issues found. Otherwise looks good to me. |
56e9e2f to
793bafb
Compare
793bafb to
c278c3d
Compare
| socketTimeout(_socketTimeout), sslConfiguration(_sslConfiguration),tcpNoDelay(_tcpNoDelay), | ||
| valueSizeEstimate(_valueSizeEstimate), maxRetries(_maxRetries), balancingStrategyProducer(bsp) {} | ||
|
|
||
| Configuration(const std::string &_protocolVersion, |
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.
I think the other constructor can be removed, since the builder will use this one now ?
|
A test is missing. Would it be possible to re-use one from the Java testsuite, as the setup is fairly complex ? |
|
@tristantarrant seems possible to re-use the java testsuite, I'm working on it |
b025049 to
30d38fd
Compare
|
@tristantarrant I changed the PR. Now the feature should be equivalent to the java one:
|
| ServerConfigurationBuilder& addServer() { | ||
| if (m_serversMap.find("DEFAULT_CLUSTER_NAME")== m_serversMap.end()) | ||
| { | ||
| m_serversMap["DEFAULT_CLUSTER_NAME"]; |
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.
can DEFAULT_CLUSTER_NAME be constified?
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.
Sure. Done.
|
It looks great now, just a minor request |
30d38fd to
2cce844
Compare
|
Pushed to master, thanks |
Implementation of the client cross cluster failover