modules/common/cassandra-ccm/cassandra-ccm-core/src/test/resources/expected.cassandra-jvm.properties
| 2 -
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/StorageNodeManagerBean.java
| 12 +++++-----
2 files changed, 8 insertions(+), 6 deletions(-)
New commits:
commit b2098e8b9b670709054aa796dfa4312a38c58b7a
Author: John Sanda <jsanda(a)redhat.com>
Date: Wed Jul 31 13:36:33 2013 -0400
fix check for determining whether or not read repair is needed when adding nodes
diff --git
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/StorageNodeManagerBean.java
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/StorageNodeManagerBean.java
index ee0f406..1c96e27 100644
---
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/StorageNodeManagerBean.java
+++
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/StorageNodeManagerBean.java
@@ -866,19 +866,21 @@ public class StorageNodeManagerBean implements
StorageNodeManagerLocal, StorageN
List<StorageNode> storageNodes =
entityManager.createNamedQuery(StorageNode.QUERY_FIND_ALL_BY_MODE,
StorageNode.class).setParameter("operationMode",
OperationMode.NORMAL).getResultList();
- int clusterSize = storageNodes.size();
+ // The previous cluster size will be the current size - 1 since we currently
only
+ // support deploying one node at a time.
+ int previousClusterSize = storageNodes.size() - 1;
boolean isReadRepairNeeded;
- if (clusterSize >= 4) {
+ if (previousClusterSize >= 4) {
// At 4 nodes we increase the RF to 3. We are not increasing the RF beyond
// that for additional nodes; so, there is no need to run repair if we are
// expanding from a 4 node cluster since the RF remains the same.
isReadRepairNeeded = false;
- } else if (clusterSize == 1) {
+ } else if (previousClusterSize == 1) {
// The RF will increase since we are going from a single to a multi-node
// cluster; therefore, we want to run repair.
isReadRepairNeeded = true;
- } else if (clusterSize == 2) {
+ } else if (previousClusterSize == 2) {
if (storageNodes.size() > 3) {
// If we go from 2 to > 3 nodes we will increase the RF to 3;
therefore
// we want to run repair.
@@ -888,7 +890,7 @@ public class StorageNodeManagerBean implements
StorageNodeManagerLocal, StorageN
// to run repair.
isReadRepairNeeded = false;
}
- } else if (clusterSize == 3) {
+ } else if (previousClusterSize == 3) {
// We are increasing the cluster size > 3 which means the RF will be
// updated to 3; therefore, we want to run repair.
isReadRepairNeeded = true;
commit cee13fdf4fe40573568616c2729a0e6f97f6fe5f
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Jul 30 16:41:18 2013 -0400
update itest
diff --git
a/modules/common/cassandra-ccm/cassandra-ccm-core/src/test/resources/expected.cassandra-jvm.properties
b/modules/common/cassandra-ccm/cassandra-ccm-core/src/test/resources/expected.cassandra-jvm.properties
index 774a831..588fb3d 100644
---
a/modules/common/cassandra-ccm/cassandra-ccm-core/src/test/resources/expected.cassandra-jvm.properties
+++
b/modules/common/cassandra-ccm/cassandra-ccm-core/src/test/resources/expected.cassandra-jvm.properties
@@ -13,7 +13,7 @@ heap_new=-Xmn${HEAP_NEWSIZE}
heap_dump_on_OOMError="-XX:+HeapDumpOnOutOfMemoryError"
-heap_dump_dir=""
+heap_dump_dir=
thread_stack_size=-Xss180k
Show replies by date