Skip to content

JAVA-989: Include keyspace name when invalid replication found.#525

Merged
olim7t merged 2 commits into
2.1from
java989
Dec 2, 2015
Merged

JAVA-989: Include keyspace name when invalid replication found.#525
olim7t merged 2 commits into
2.1from
java989

Conversation

@tolbertam
Copy link
Copy Markdown
Contributor

For JAVA-989. Now logs the following when invalid replication is found on a keyspace:

Error while computing token map for keyspace X with datacenter Y: could not achieve replication factor 3 (found 2 replicas only), check your keyspace replication settings.

The one thing i'm not so sure of here is passing the keyspace name into computeTokenToReplicaMap. It is only used for logging, so seems somewhat extraneous, but since this is an internal API maybe this is not too much of a problem.

@adutra adutra added this to the 2.1.10 milestone Nov 30, 2015
@adutra
Copy link
Copy Markdown
Contributor

adutra commented Dec 2, 2015

Rebased on current 2.1 and added patch from @snazy for JAVA-664.
Note that the patch did not apply cleanly, so I had to apply manually.
Four tests are failing after this patch:

  • SimpleStrategyTest.simpleStrategyExampleTopologyMapTest
  • SimpleStrategyTest.simpleStrategyExampleTopologyTooManyReplicasTest
  • NetworkTopologyStrategyTest.networkTopologyStrategyExampleTopologyTest
  • NetworkTopologyStrategyTest.networkTopologyStrategyExampleTopologyTooManyReplicasTest

@adutra adutra removed the reviewed_AD label Dec 2, 2015
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We can't memoize replicas based on primaryHost. What determines the contents of replicas is the section of the ring after token i; but multiple tokens can be assigned to the same host, so for different start positions you might get the same primaryHost, but what you encounter next on the ring will not be the same. That's why the tests fail.

@olim7t
Copy link
Copy Markdown
Contributor

olim7t commented Dec 2, 2015

👍

@tolbertam
Copy link
Copy Markdown
Contributor Author

big 👍 on the JAVA-664 change

olim7t added a commit that referenced this pull request Dec 2, 2015
JAVA-989: Include keyspace name when invalid replication found.
@olim7t olim7t merged commit 64079de into 2.1 Dec 2, 2015
@olim7t olim7t deleted the java989 branch December 2, 2015 17:17
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.

5 participants