Pandra icon indicating copy to clipboard operation
Pandra copied to clipboard

PandraCore::getRangeKey - Key range is overlapping keys

Open loretoparisi opened this issue 14 years ago • 0 comments

I'm using the key slice in this way on a Super Column Family:

 $res=PandraCore::getRangeKeys(
        'myNS',
        array('start'=>$start,'finish'=>''),
        new cassandra_ColumnParent(array(
            'column_family' => 'mySCF',
        )),
    new PandraSlicePredicate(
        PandraSlicePredicate::TYPE_RANGE,
        array('start' => '',
            'finish' => '',
            'count' => $limit,
            'reversed' => true)),
            $limit
        );

This is the only way using parameters $start and $limit to achieve a sortain of key range, sliciing from $start=0 to $start=$limit

But something is wrong, because I'm having back same keys during iterations:

Event: block:1 start:50 size:24 count:24 memory: 6.22 M

  • index:0 id 47ce2c4d31d8e4cdf8f8190e66be8b17 tag 0
  • index:1 id c58cafee1a1032ae4a54d41d342f4660 tag 0
  • index:2 id b4dfd506827bd2bfb4456d18b4d8e328 tag 0
  • index:3 id 450b9461e2a84c99149fd7b1a9c10ec4 tag 0

Following keys will be repeated in the next loop:

  • index:4 id 06c6e7ab3c8b2745716df257ac8fcdf9 tag 0
    • index:5 id __37cb2c60594cd5b8cb9419f275f2e2 tag 0
    • index:6 id 65c9eb832df73c5462fc69514fd2baac tag 0 (...omissis)
    • index:23 id 49721dbb746319b5548e3b455622317f tag 0

And the repeating keys block: Event: block:0 start:26 size:20 count:44 memory: 6.22 M

  • index:24 id 06c6e7ab3c8b2745716df257ac8fcdf9 tag 0
  • index:25 id __37cb2c60594cd5b8cb9419f275f2e2 tag 0
  • index:26 id 65c9eb832df73c5462fc69514fd2baac tag 0 (...omissis)
    • index:43 id 49721dbb746319b5548e3b455622317f tag 0

Since the block total size should be 50, from the second block (I'm reading from the last one), starting from 26: Event: block:0 start:26 size:20 count:44 memory: 6.22 M

I should have a new key range. What's happening is that key ranges are overlapping in some way.

Any idea?

loretoparisi avatar Dec 10 '10 00:12 loretoparisi