cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Ellis <>
Subject Re: Problem using get_range_slices
Date Wed, 21 Apr 2010 19:22:08 GMT
On Wed, Apr 21, 2010 at 2:19 PM, Guilherme Kaster
<> wrote:
> I've encountered a problem on cassandra 0.6 while using get_ranged_slices.
> I use RP and when I use get_range_slices the keys are not returned in an
> "ordered" maner, that means the last key on the list not always the
> "greater" key in the list, so I started getting repetitions and ONCE entered
> in an infinite loop because the last key on the list was the same start key
> I used (keys are inclusive). So a dig a little in cassandra code and found
> where keys are converted to tokens in RP (FBUtilities.hash) and started
> using tokens, which are not inclusive, starting with token 0. That solved
> one of my problems. But the keys where still not returned ascending in
> order. I converted them to tokens but the tokens are also not in order. So I
> now use as the "new" start token of the next iteration of get_range_slices
> the "greater" token (converted from key) found in the returned list.
> Is that correct? Has anyone else had the same problem?

Right, everything is working as designed.  If you want keys ordered
you have to use OPP.

You can use "start with the key that was last in the previous
iteration" with keys, you don't have to drop down to tokens for that.


View raw message