Skip to content

Conversation

@rigazilla
Copy link
Contributor

Implementation of the client cross cluster failover

@infinispanrelease
Copy link

FAILURE - TeamCity HotRod C++ Client :: Pull requests monitor - WIN_S2012 Build 509 for 47f720f
Tests: 0, 0 failed (0 new), 0 ignored. Build time: 00:07:20

Process exited with code 255

@infinispanrelease
Copy link

FAILURE - TeamCity HotRod C++ Client :: Pull requests monitor - WIN_S2012 Build 510 for 47f720f
Tests: 0, 0 failed (0 new), 0 ignored. Build time: 00:07:04

Process exited with code 255

@infinispanrelease
Copy link

FAILURE - TeamCity HotRod C++ Client :: Pull requests monitor - RHEL Build 646 for 47f720f
Tests: 0, 0 failed (0 new), 0 ignored. Build time: 00:08:18

Process exited with code 8

@rigazilla rigazilla force-pushed the HRCPP-286/failover branch from 47f720f to 96de864 Compare July 7, 2016 16:10
@infinispanrelease
Copy link

SUCCESS - TeamCity HotRod C++ Client :: Pull requests monitor - RHEL Build 647 for 96de864
Tests: 0, 0 failed (0 new), 0 ignored. Build time: 00:05:44

@infinispanrelease
Copy link

SUCCESS - TeamCity HotRod C++ Client :: Pull requests monitor - WIN_S2012 Build 512 for 96de864
Tests: 0, 0 failed (0 new), 0 ignored. Build time: 00:07:29

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)
Copy link
Contributor

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..

@slaskawi
Copy link
Contributor

Only some really small formatting issues found. Otherwise looks good to me.

@rigazilla rigazilla force-pushed the HRCPP-286/failover branch 4 times, most recently from 56e9e2f to 793bafb Compare September 6, 2016 16:41
socketTimeout(_socketTimeout), sslConfiguration(_sslConfiguration),tcpNoDelay(_tcpNoDelay),
valueSizeEstimate(_valueSizeEstimate), maxRetries(_maxRetries), balancingStrategyProducer(bsp) {}

Configuration(const std::string &_protocolVersion,
Copy link
Member

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 ?

@tristantarrant
Copy link
Member

A test is missing. Would it be possible to re-use one from the Java testsuite, as the setup is fairly complex ?

@rigazilla
Copy link
Contributor Author

@tristantarrant seems possible to re-use the java testsuite, I'm working on it

@rigazilla rigazilla force-pushed the HRCPP-286/failover branch 5 times, most recently from b025049 to 30d38fd Compare September 12, 2016 13:12
@rigazilla
Copy link
Contributor Author

@tristantarrant I changed the PR. Now the feature should be equivalent to the java one:

  • multiple (>2) clusters can be configured
  • failover occurs on the first fully working cluster (all nodes must reply to the ping op)
  • user can perform a cluster switch invoking RemoteCacheManager::clusterSwitch() and clusterSwitch(clusterName)
  • SiteDownFailoverTest.java is run against the client via SWIG

ServerConfigurationBuilder& addServer() {
if (m_serversMap.find("DEFAULT_CLUSTER_NAME")== m_serversMap.end())
{
m_serversMap["DEFAULT_CLUSTER_NAME"];
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. Done.

@tristantarrant
Copy link
Member

It looks great now, just a minor request

@tristantarrant
Copy link
Member

Pushed to master, thanks

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants