cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <>
Subject [jira] Commented: (CASSANDRA-781) in a cluster, get_range_slice() does not return all the keys it should
Date Tue, 09 Feb 2010 14:27:28 GMT


Jonathan Ellis commented on CASSANDRA-781:

Sylvain: absolutely right, patch 01 has a fix for this.

Jack: updated patch 02 with more logging at INFO, maybe that will help.  I can't reproduce
even w/ your tokens and several runs of 100 keys.  I am using a slightly simpler test, though:

        import uuid
        ks = "Keyspace1"
        cf = "Super1"
        path = ColumnPath(cf, "foo", "is")
        value = "cool"

        # insert, record keys in `keys` set
        keys = set()
        for i in xrange(100):
            key = uuid.uuid4().hex
            client.insert(ks, key, path, value, 0, ConsistencyLevel.ONE)
        # remove keys found from set
        parent = ColumnParent(column_family=cf)
        slice_range = SliceRange(start="key", finish="key")
        predicate = SlicePredicate(slice_range=slice_range)        
        result = client.get_range_slice(ks, parent, predicate, "", "", 1000, ConsistencyLevel.ONE)
        for row in result:

        # if there are any left over, there is a bug
        assert not keys, list(sorted(keys))

... this will of course only work until you insert more than 1000 keys.  (maybe your original
test has a similar limitation, i don't remember.)

(Are you still testing w/ RF of 2?  If so maybe patch 01 will help you too.)

> in a cluster, get_range_slice() does not return all the keys it should
> ----------------------------------------------------------------------
>                 Key: CASSANDRA-781
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 0.5
>         Environment: Debian 5 lenny on EC2, Gentoo linux, Windows XP
>            Reporter: bjc
>            Assignee: Jonathan Ellis
>             Fix For: 0.5, 0.6
>         Attachments: 0001-fix-timeout-bug.txt, 0002-fix-slices-over-non-trivial-wrapped-ranges.txt
> get_range_slice() does not return the same set of keys as get_key_range() in 0.5.0 final.
> I posted a program to reproduce the behavior:
> Apparently, you must have more than one node to get the behavior. Also, it may depend
on the locations of the nodes on the ring.. I.e., if you don't generate enough keys randomly,
then by chance they could all fall on the same host and you might not see the behavior, although
I was able to get it to happen using only 2 nodes and 10 keys.
> Here are the other emails describing the issue:

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

View raw message