You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Sylvain Lebresne (Issue Comment Edited) (JIRA)" <ji...@apache.org> on 2012/02/10 19:03:00 UTC

[jira] [Issue Comment Edited] (CASSANDRA-2506) Push read repair setting down to the DC-level

    [ https://issues.apache.org/jira/browse/CASSANDRA-2506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13205585#comment-13205585 ] 

Sylvain Lebresne edited comment on CASSANDRA-2506 at 2/10/12 6:01 PM:
----------------------------------------------------------------------

In the following code:
{noformat}
if (cfmd.getDcLocalReadRepair() > chance)
{
    List<InetAddress> address = localEndpoints(ep);
    // check if blockfor more than we have localep's
    return address.size() >= blockfor ? address : ep;
}
{noformat}
we shouldn't default to all the endpoints if we don't have enough in the current DC to satisfy blockfor. What we should do is include all local endpoint and adds enough other endpoints to satisfy blockfor, but not more. Attaching 2506_v2 patch that does this (note that it would almost work to return {{ep.subList(0, Math.min(ep.size(), blockfor))}} since ep are sorted by proximity but but the patch don't use that since it could be possible in theory that some node from other DC sort before local endpoint if the snitch happens to say so)

The rebase was also missing the CQL code for the new option, v2 includes it (for CQL 2 & 3).

Otherwise, this lgtm.
                
      was (Author: slebresne):
    In the following code:
{noformat}
if (cfmd.getDcLocalReadRepair() > chance)
{
    List<InetAddress> address = localEndpoints(ep);
    // check if blockfor more than we have localep's
    return address.size() >= blockfor ? address : ep;
}
{noformat}
we should default to all the endpoints if we don't have enough in the current DC to satisfy blockfor. What we should do is include all local endpoint and adds enough other endpoints to satisfy blockfor, but not more. Attaching 2506_v2 patch that does this (note that it would almost work to return {{ep.subList(0, Math.min(ep.size(), blockfor))}} since ep are sorted by proximity but but the patch don't use that since it could be possible in theory that some node from other DC sort before local endpoint if the snitch happens to say so)

The rebase was also missing the CQL code for the new option, v2 includes it (for CQL 2 & 3).

Otherwise, this lgtm.
                  
> Push read repair setting down to the DC-level
> ---------------------------------------------
>
>                 Key: CASSANDRA-2506
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2506
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Brandon Williams
>            Assignee: Vijay
>            Priority: Minor
>             Fix For: 1.1.1
>
>         Attachments: 0001-avro-and-Thrift-2506.patch, 0001-dc-localized-read-repair-v2.patch, 0001-dc-localized-read-repair.patch, 0001-documentation-for-read_repair-v4.patch, 0001-thrift-and-avro-changes-v3.patch, 0002-dc-local-read-repair-2506.patch, 0002-dc-localized-read-repair-v3.patch, 0002-thrift-and-avro-v2.patch, 0002-thrift-and-avro-v4.patch, 0002-thrift-and-avro.patch, 0003-dc-localized-read-repair-v4.patch, 0003-documentation-for-read_repair-v3.patch, 0003-documentation-for-read_repair_options-v2.patch, 0003-documentation-for-read_repair_options.patch, 2506-v2.patch
>
>
> Currently, read repair is a global setting.  However, when you have two DCs and use one for analytics, it would be nice to turn it off only for that DC so the live DC serving the application can still benefit from it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira