You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (JIRA)" <ji...@apache.org> on 2010/07/24 03:42:51 UTC

[jira] Created: (CASSANDRA-1314) snitch that prefers a single replica for all reads to a given key

snitch that prefers a single replica for all reads to a given key
-----------------------------------------------------------------

                 Key: CASSANDRA-1314
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1314
             Project: Cassandra
          Issue Type: New Feature
          Components: Core
            Reporter: Jonathan Ellis
            Assignee: Jonathan Ellis
            Priority: Minor
             Fix For: 0.7 beta 1


motivation is, if you reduce or eliminate read repair (CASSANDRA-930) then you can cache about RF times as much data in memory, than if you're scattering reads across all the replicas equally.

making this data-center aware would be a nice improvement, but i'm just targetting a single DC here.

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


[jira] Commented: (CASSANDRA-1314) snitch that prefers a single replica for all reads to a given key

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12892165#action_12892165 ] 

Jonathan Ellis commented on CASSANDRA-1314:
-------------------------------------------

this won't be effective w/o disabling readrepair.

in 0.6, <DoConsistencyChecksBoolean>false</DoConsistencyChecksBoolean> under
<Storage>

in 0.7, read_repair_chance=0

> snitch that prefers a single replica for all reads to a given key
> -----------------------------------------------------------------
>
>                 Key: CASSANDRA-1314
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1314
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.6.4
>
>         Attachments: StaticPreferenceSnitch.java
>
>
> motivation is, if you reduce or eliminate read repair (CASSANDRA-930) then you can cache about RF times as much data in memory, than if you're scattering reads across all the replicas equally.
> making this data-center aware would be a nice improvement, but i'm just targetting a single DC here.

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


[jira] Reopened: (CASSANDRA-1314) snitch that prefers a single replica for all reads to a given key

Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brandon Williams reopened CASSANDRA-1314:
-----------------------------------------


Oops, I get build failures on the tests that I overlooked before:

build-test:
    [javac] Compiling 89 source files to /srv/cassandra/build/test/classes
    [javac] /srv/cassandra/test/unit/org/apache/cassandra/locator/ReplicationStrategyEndpointCacheTest.java:122: calculateNaturalEndpoints(org.apache.cassandra.dht.Token,org.apache.cassandra.locator.TokenMetadata) in org.apache.cassandra.locator.ReplicationStrategyEndpointCacheTest.FakeSimpleStrategy cannot override calculateNaturalEndpoints(org.apache.cassandra.dht.Token,org.apache.cassandra.locator.TokenMetadata) in org.apache.cassandra.locator.AbstractReplicationStrategy; attempting to use incompatible return type
    [javac] found   : java.util.Set<java.net.InetAddress>
    [javac] required: java.util.List<java.net.InetAddress>
    [javac]         public Set<InetAddress> calculateNaturalEndpoints(Token token, TokenMetadata metadata)
    [javac]                                 ^
    [javac] /srv/cassandra/test/unit/org/apache/cassandra/locator/ReplicationStrategyEndpointCacheTest.java:126: incompatible types
    [javac] found   : java.util.List<java.net.InetAddress>
    [javac] required: java.util.Set<java.net.InetAddress>
    [javac]             return super.calculateNaturalEndpoints(token, metadata);
    [javac]                                                   ^
    [javac] /srv/cassandra/test/unit/org/apache/cassandra/locator/ReplicationStrategyEndpointCacheTest.java:121: method does not override or implement a method from a supertype
    [javac]         @Override
    [javac]         ^
    [javac] /srv/cassandra/test/unit/org/apache/cassandra/locator/ReplicationStrategyEndpointCacheTest.java:140: calculateNaturalEndpoints(org.apache.cassandra.dht.Token,org.apache.cassandra.locator.TokenMetadata) in org.apache.cassandra.locator.ReplicationStrategyEndpointCacheTest.FakeOldNetworkTopologyStrategy cannot override calculateNaturalEndpoints(org.apache.cassandra.dht.Token,org.apache.cassandra.locator.TokenMetadata) in org.apache.cassandra.locator.AbstractReplicationStrategy; attempting to use incompatible return type
    [javac] found   : java.util.Set<java.net.InetAddress>
    [javac] required: java.util.List<java.net.InetAddress>
    [javac]         public Set<InetAddress> calculateNaturalEndpoints(Token token, TokenMetadata metadata)
    [javac]                                 ^
    [javac] /srv/cassandra/test/unit/org/apache/cassandra/locator/ReplicationStrategyEndpointCacheTest.java:144: incompatible types
    [javac] found   : java.util.List<java.net.InetAddress>
    [javac] required: java.util.Set<java.net.InetAddress>
    [javac]             return super.calculateNaturalEndpoints(token, metadata);
    [javac]                                                   ^
    [javac] /srv/cassandra/test/unit/org/apache/cassandra/locator/ReplicationStrategyEndpointCacheTest.java:139: method does not override or implement a method from a supertype
    [javac]         @Override
    [javac]         ^
    [javac] /srv/cassandra/test/unit/org/apache/cassandra/locator/ReplicationStrategyEndpointCacheTest.java:158: calculateNaturalEndpoints(org.apache.cassandra.dht.Token,org.apache.cassandra.locator.TokenMetadata) in org.apache.cassandra.locator.ReplicationStrategyEndpointCacheTest.FakeNetworkTopologyStrategy cannot override calculateNaturalEndpoints(org.apache.cassandra.dht.Token,org.apache.cassandra.locator.TokenMetadata) in org.apache.cassandra.locator.AbstractReplicationStrategy; attempting to use incompatible return type
    [javac] found   : java.util.Set<java.net.InetAddress>
    [javac] required: java.util.List<java.net.InetAddress>
    [javac]         public Set<InetAddress> calculateNaturalEndpoints(Token token, TokenMetadata metadata)
    [javac]                                 ^
    [javac] /srv/cassandra/test/unit/org/apache/cassandra/locator/ReplicationStrategyEndpointCacheTest.java:162: incompatible types
    [javac] found   : java.util.List<java.net.InetAddress>
    [javac] required: java.util.Set<java.net.InetAddress>
    [javac]             return super.calculateNaturalEndpoints(token, metadata);
    [javac]                                                   ^
    [javac] /srv/cassandra/test/unit/org/apache/cassandra/locator/ReplicationStrategyEndpointCacheTest.java:157: method does not override or implement a method from a supertype
    [javac]         @Override
    [javac]         ^
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 9 errors

BUILD FAILED

> snitch that prefers a single replica for all reads to a given key
> -----------------------------------------------------------------
>
>                 Key: CASSANDRA-1314
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1314
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.7 beta 2
>
>         Attachments: 1314.txt, SimpleSnitch.java, StaticPreferenceSnitch.java
>
>
> motivation is, if you reduce or eliminate read repair (CASSANDRA-930) then you can cache about RF times as much data in memory, than if you're scattering reads across all the replicas equally.
> making this data-center aware would be a nice improvement, but i'm just targetting a single DC here.

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


[jira] Updated: (CASSANDRA-1314) snitch that prefers a single replica for all reads to a given key

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-1314:
--------------------------------------

    Attachment: StaticPreferenceSnitch.java

> snitch that prefers a single replica for all reads to a given key
> -----------------------------------------------------------------
>
>                 Key: CASSANDRA-1314
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1314
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.6.4
>
>         Attachments: StaticPreferenceSnitch.java
>
>
> motivation is, if you reduce or eliminate read repair (CASSANDRA-930) then you can cache about RF times as much data in memory, than if you're scattering reads across all the replicas equally.
> making this data-center aware would be a nice improvement, but i'm just targetting a single DC here.

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


[jira] Resolved: (CASSANDRA-1314) snitch that prefers a single replica for all reads to a given key

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis resolved CASSANDRA-1314.
---------------------------------------

    Resolution: Fixed

committed

> snitch that prefers a single replica for all reads to a given key
> -----------------------------------------------------------------
>
>                 Key: CASSANDRA-1314
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1314
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.7 beta 2
>
>         Attachments: 1314.txt, SimpleSnitch.java, StaticPreferenceSnitch.java
>
>
> motivation is, if you reduce or eliminate read repair (CASSANDRA-930) then you can cache about RF times as much data in memory, than if you're scattering reads across all the replicas equally.
> making this data-center aware would be a nice improvement, but i'm just targetting a single DC here.

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


[jira] Updated: (CASSANDRA-1314) snitch that prefers a single replica for all reads to a given key

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-1314:
--------------------------------------

    Fix Version/s: 0.7 beta 2
                       (was: 0.7.0)
         Reviewer: brandon.williams

> snitch that prefers a single replica for all reads to a given key
> -----------------------------------------------------------------
>
>                 Key: CASSANDRA-1314
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1314
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.7 beta 2
>
>         Attachments: SimpleSnitch.java, StaticPreferenceSnitch.java
>
>
> motivation is, if you reduce or eliminate read repair (CASSANDRA-930) then you can cache about RF times as much data in memory, than if you're scattering reads across all the replicas equally.
> making this data-center aware would be a nice improvement, but i'm just targetting a single DC here.

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


[jira] Commented: (CASSANDRA-1314) snitch that prefers a single replica for all reads to a given key

Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913197#action_12913197 ] 

Brandon Williams commented on CASSANDRA-1314:
---------------------------------------------

+1.  Note that the dynamic snitch defeats this until CASSANDRA-1519 is solved.

> snitch that prefers a single replica for all reads to a given key
> -----------------------------------------------------------------
>
>                 Key: CASSANDRA-1314
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1314
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.7 beta 2
>
>         Attachments: 1314.txt, SimpleSnitch.java, StaticPreferenceSnitch.java
>
>
> motivation is, if you reduce or eliminate read repair (CASSANDRA-930) then you can cache about RF times as much data in memory, than if you're scattering reads across all the replicas equally.
> making this data-center aware would be a nice improvement, but i'm just targetting a single DC here.

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


[jira] Updated: (CASSANDRA-1314) snitch that prefers a single replica for all reads to a given key

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-1314:
--------------------------------------

    Attachment: 1314.txt

> snitch that prefers a single replica for all reads to a given key
> -----------------------------------------------------------------
>
>                 Key: CASSANDRA-1314
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1314
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.7 beta 2
>
>         Attachments: 1314.txt, SimpleSnitch.java, StaticPreferenceSnitch.java
>
>
> motivation is, if you reduce or eliminate read repair (CASSANDRA-930) then you can cache about RF times as much data in memory, than if you're scattering reads across all the replicas equally.
> making this data-center aware would be a nice improvement, but i'm just targetting a single DC here.

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


[jira] Commented: (CASSANDRA-1314) snitch that prefers a single replica for all reads to a given key

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12898710#action_12898710 ] 

Jonathan Ellis commented on CASSANDRA-1314:
-------------------------------------------

at least one person on IRC would like the order of nodes from Strategy (which i believe is exposed almost directly by describe_ring) to be in algorithmic order so he can easily pick non-overlapping ranges to process on each node locally.

so maybe moving Strategy back to a List (instead of the current Set) and making that explicit guarantee is the easiest solution to both.

> snitch that prefers a single replica for all reads to a given key
> -----------------------------------------------------------------
>
>                 Key: CASSANDRA-1314
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1314
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.7.0
>
>         Attachments: SimpleSnitch.java, StaticPreferenceSnitch.java
>
>
> motivation is, if you reduce or eliminate read repair (CASSANDRA-930) then you can cache about RF times as much data in memory, than if you're scattering reads across all the replicas equally.
> making this data-center aware would be a nice improvement, but i'm just targetting a single DC here.

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


[jira] Updated: (CASSANDRA-1314) snitch that prefers a single replica for all reads to a given key

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-1314:
--------------------------------------

    Attachment: SimpleSnitch.java

for 0.6 we'll have to "cheat" and rely on our knowledge that the ordering we already have is in token order for the key in question.

The problem is that the snitch needs to return different nodes for different keys given the same set of addresses, and it doesn't have enough information to do that.

> snitch that prefers a single replica for all reads to a given key
> -----------------------------------------------------------------
>
>                 Key: CASSANDRA-1314
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1314
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.7.0
>
>         Attachments: SimpleSnitch.java, StaticPreferenceSnitch.java
>
>
> motivation is, if you reduce or eliminate read repair (CASSANDRA-930) then you can cache about RF times as much data in memory, than if you're scattering reads across all the replicas equally.
> making this data-center aware would be a nice improvement, but i'm just targetting a single DC here.

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


[jira] Updated: (CASSANDRA-1314) snitch that prefers a single replica for all reads to a given key

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-1314:
--------------------------------------

    Fix Version/s: 0.7.0
                       (was: 0.6.4)

> snitch that prefers a single replica for all reads to a given key
> -----------------------------------------------------------------
>
>                 Key: CASSANDRA-1314
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1314
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.7.0
>
>         Attachments: SimpleSnitch.java, StaticPreferenceSnitch.java
>
>
> motivation is, if you reduce or eliminate read repair (CASSANDRA-930) then you can cache about RF times as much data in memory, than if you're scattering reads across all the replicas equally.
> making this data-center aware would be a nice improvement, but i'm just targetting a single DC here.

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


[jira] Updated: (CASSANDRA-1314) snitch that prefers a single replica for all reads to a given key

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-1314:
--------------------------------------

    Attachment:     (was: StaticPreferenceSnitch.java)

> snitch that prefers a single replica for all reads to a given key
> -----------------------------------------------------------------
>
>                 Key: CASSANDRA-1314
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1314
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.6.4
>
>         Attachments: StaticPreferenceSnitch.java
>
>
> motivation is, if you reduce or eliminate read repair (CASSANDRA-930) then you can cache about RF times as much data in memory, than if you're scattering reads across all the replicas equally.
> making this data-center aware would be a nice improvement, but i'm just targetting a single DC here.

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


[jira] Updated: (CASSANDRA-1314) snitch that prefers a single replica for all reads to a given key

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-1314:
--------------------------------------

    Attachment: StaticPreferenceSnitch.java

> snitch that prefers a single replica for all reads to a given key
> -----------------------------------------------------------------
>
>                 Key: CASSANDRA-1314
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1314
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.6.4
>
>         Attachments: StaticPreferenceSnitch.java
>
>
> motivation is, if you reduce or eliminate read repair (CASSANDRA-930) then you can cache about RF times as much data in memory, than if you're scattering reads across all the replicas equally.
> making this data-center aware would be a nice improvement, but i'm just targetting a single DC here.

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


[jira] Resolved: (CASSANDRA-1314) snitch that prefers a single replica for all reads to a given key

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis resolved CASSANDRA-1314.
---------------------------------------

    Resolution: Fixed

fixed in r999606

> snitch that prefers a single replica for all reads to a given key
> -----------------------------------------------------------------
>
>                 Key: CASSANDRA-1314
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1314
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.7 beta 2
>
>         Attachments: 1314.txt, SimpleSnitch.java, StaticPreferenceSnitch.java
>
>
> motivation is, if you reduce or eliminate read repair (CASSANDRA-930) then you can cache about RF times as much data in memory, than if you're scattering reads across all the replicas equally.
> making this data-center aware would be a nice improvement, but i'm just targetting a single DC here.

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