[
https://issues.apache.org/jira/browse/CASSANDRA-781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831468#action_12831468
]
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)
keys.add(key)
# 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:
keys.discard(row.key)
# 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: https://issues.apache.org/jira/browse/CASSANDRA-781
> 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:
> http://www.mail-archive.com/[email protected]/msg01474.html
> 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:
> http://www.mail-archive.com/[email protected]/msg02423.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.