cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jignesh Dhruv (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CASSANDRA-1487) Bug in calculating QUORUM
Date Thu, 09 Sep 2010 20:19:35 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-1487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jignesh Dhruv updated CASSANDRA-1487:
-------------------------------------

    Comment: was deleted

(was: --- src/java/org/apache/cassandra/service/QuorumResponseHandler.java    (revision 995482)
+++ src/java/org/apache/cassandra/service/QuorumResponseHandler.java    (working copy)
@@ -109,7 +109,7 @@
             case ANY:
                 return 1;
             case QUORUM:
-                return (DatabaseDescriptor.getQuorum(table)/ 2) + 1;
+                return DatabaseDescriptor.getQuorum(table);
             case ALL:
                 return DatabaseDescriptor.getReplicationFactor(table);
             default:
)

> Bug in calculating QUORUM
> -------------------------
>
>                 Key: CASSANDRA-1487
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1487
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.7 beta 1
>            Reporter: Jignesh Dhruv
>
> Hello,
> It seems that there is a bug in calculating QUORUM in src/java/org/apache/cassandra/service/QuorumResponseHandler.java
> Currently the QUORUM formula in place will return correct QUORUM if replication factor
<= 3. However if you have a Replication Factor > 3, it will return incorrect result.
> -----------------------
> --- src/java/org/apache/cassandra/service/QuorumResponseHandler.java    (revision 995482)
> +++ src/java/org/apache/cassandra/service/QuorumResponseHandler.java    (working copy)
> @@ -109,7 +109,7 @@
>              case ANY:
>                  return 1;
>              case QUORUM:
> -                return (DatabaseDescriptor.getQuorum(table)/ 2) + 1;
> +                return DatabaseDescriptor.getQuorum(table);
>              case ALL:
>                  return DatabaseDescriptor.getReplicationFactor(table);
>              default:
> -------------------
> In QuorumResponseHandler:determineBlockFor()
> DatabaseDescriptor.getQuorum(table) is already returning a quorum value which is further
divided by 2 and a one is added.
> So say if your RF=6, it is suppose to check 4 replicas, (6/2)+1=4 but it ends up checking
only 3 replicas as DatabaseDescriptor.getQuorum returns 4, so determineBlockFor will return
(4/2)+1=3.
> Let me know if you have any questions.
> Jignesh

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message