cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juho Mäkinen (JIRA) <j...@apache.org>
Subject [jira] Updated: (CASSANDRA-1627) Better QUORUM calculation algorithm
Date Mon, 18 Oct 2010 09:52:24 GMT

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

Juho Mäkinen updated CASSANDRA-1627:
------------------------------------

    Description: 
The current QUORUM calculation algorithm is a bit problematic on some setups, especially when
using ReplicationFactor 3 (RF=3).

As the current algorithm is "N / 2 + 1" the result is rounded to nearest integer, resulting
that on RF=3 the QUORUM is also 3. Discussion with ntelford and ron_r resulted a better suggestion
to use FLOOR(N / 2 + 1), resulting QUORUM 2 on RF=3, but also decreasing the QUORUM value
on odd RF numbers above RF=4, resulting faster cluster operation but still maintaining the
QUORUM requirement.

Here's a table showing current method and the new suggestion:
||RF|||1||2||3||4||5||6||7||8||9||10||
|round(N / 2 + 1)|2|2|3|3|4|4|5|5|6|6|
|FLOOR(N/2 + 1)|1|2|2|3|3|4|4|5|5|6|

EDIT: as pcmanus pointed out, the N/2+1 calculation indeed returns 2 when N=2, so the round
error doesn't occur here. I'll need to dig the problem up a bit because this suggestion originated
when my cluster returned UnavailableException (I'm using RF=3) when doing QUORUM operations
when one node was down.


  was:
The current QUORUM calculation algorithm is a bit problematic on some setups, especially when
using ReplicationFactor 3 (RF=3).

As the current algorithm is "N / 2 + 1" the result is rounded to nearest integer, resulting
that on RF=3 the QUORUM is also 3. Discussion with ntelford and ron_r resulted a better suggestion
to use FLOOR(N / 2 + 1), resulting QUORUM 2 on RF=3, but also decreasing the QUORUM value
on odd RF numbers above RF=4, resulting faster cluster operation but still maintaining the
QUORUM requirement.

Here's a table showing current method and the new suggestion:
||RF|||1||2||3||4||5||6||7||8||9||10||
|round(N / 2 + 1)|2|2|3|3|4|4|5|5|6|6|
|FLOOR(N/2 + 1)|1|2|2|3|3|4|4|5|5|6|


       Priority: Minor  (was: Major)

> Better QUORUM calculation algorithm 
> ------------------------------------
>
>                 Key: CASSANDRA-1627
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1627
>             Project: Cassandra
>          Issue Type: Bug
>          Components: API, Core
>            Reporter: Juho Mäkinen
>            Priority: Minor
>
> The current QUORUM calculation algorithm is a bit problematic on some setups, especially
when using ReplicationFactor 3 (RF=3).
> As the current algorithm is "N / 2 + 1" the result is rounded to nearest integer, resulting
that on RF=3 the QUORUM is also 3. Discussion with ntelford and ron_r resulted a better suggestion
to use FLOOR(N / 2 + 1), resulting QUORUM 2 on RF=3, but also decreasing the QUORUM value
on odd RF numbers above RF=4, resulting faster cluster operation but still maintaining the
QUORUM requirement.
> Here's a table showing current method and the new suggestion:
> ||RF|||1||2||3||4||5||6||7||8||9||10||
> |round(N / 2 + 1)|2|2|3|3|4|4|5|5|6|6|
> |FLOOR(N/2 + 1)|1|2|2|3|3|4|4|5|5|6|
> EDIT: as pcmanus pointed out, the N/2+1 calculation indeed returns 2 when N=2, so the
round error doesn't occur here. I'll need to dig the problem up a bit because this suggestion
originated when my cluster returned UnavailableException (I'm using RF=3) when doing QUORUM
operations when one node was down.

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