Cassandra
  1. Cassandra
  2. CASSANDRA-348

Range scan over two nodes returns wrong data

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Fix Version/s: 0.4
    • Component/s: Core
    • Labels:
      None

      Description

      I've got two nodes with tokens 00000000 and 88888888. I add 16 rows in which are spread over them, then do a key range scan.

      I can scan part of the range successfully, but if I try to scan the entire range of keys (0-f) then I get unexpected results

      ./Cassandra-remote -h localhost:9160 get_key_range Keyspace1 Standard1 0 31 1000
      ['00', '01', '10', '11', '20', '21', '30', '31']

      ./Cassandra-remote -h localhost:9160 get_key_range Keyspace1 Standard1 3 81 1000
      ['30', '31', '40', '41', '50', '51', '60', '61', '70', '71', '80', '81']

      ./Cassandra-remote -h localhost:9160 get_key_range Keyspace1 Standard1 7 b1 1000
      ['70', '71', '80', '81', '90', '91', 'a0', 'a1', 'b0', 'b1']

      ./Cassandra-remote -h localhost:9160 get_key_range Keyspace1 Standard1 a g 1000
      ['a0', 'a1', 'b0', 'b1', 'c0', 'c1', 'd0', 'd1', 'e0', 'e1', 'f0', 'f1']

      All of which returned as I expected.

      But when I range scan the whole lot (0-g) then I get:

      ./Cassandra-remote -h localhost:9160 get_key_range Keyspace1 Standard1 0 g 1000
      [ '00',
      '90',
      '91',
      'a0',
      'a1',
      'b0',
      'b1',
      'c0',
      'c1',
      'd0',
      'd1',
      'e0',
      'e1',
      'f0',
      'f1']

      Where have 01-81 gone?

      I'll attach the data loading script.

      1. setup.cas
        1 kB
        Mark Robson
      2. LoadAndScan.py
        2 kB
        Mark Robson
      3. 348-3-v2.patch
        3 kB
        Jonathan Ellis
      4. 348-3.patch
        2 kB
        Jonathan Ellis
      5. 348-2-fixup-2.patch
        1 kB
        Mark Robson
      6. 348-2-fixup.patch
        0.5 kB
        Mark Robson
      7. 348-2.patch
        21 kB
        Jonathan Ellis
      8. 348.diff
        10 kB
        Jonathan Ellis

        Activity

        Gavin made changes -
        Workflow patch-available, re-open possible [ 12750807 ] reopen-resolved, no closed status, patch-avail, testing [ 12755680 ]
        Gavin made changes -
        Workflow no-reopen-closed, patch-avail [ 12472510 ] patch-available, re-open possible [ 12750807 ]
        Jonathan Ellis made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Jonathan Ellis made changes -
        Attachment 348-3-v2.patch [ 12416357 ]
        Jonathan Ellis made changes -
        Attachment 348-3.patch [ 12416343 ]
        Michael Greene made changes -
        Component/s Core [ 12312978 ]
        Jonathan Ellis made changes -
        Fix Version/s 0.4 [ 12313862 ]
        Jonathan Ellis made changes -
        Assignee Jonathan Ellis [ jbellis ]
        Mark Robson made changes -
        Attachment 348-2-fixup-2.patch [ 12415886 ]
        Mark Robson made changes -
        Attachment 348-2-fixup.patch [ 12415885 ]
        Mark Robson made changes -
        Comment [ This patch goes on top of 348-2.patch to fix the exception I described earlier. My Java is not good so this may not be the right way of doing it, but it works for me. ]
        Mark Robson made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Jonathan Ellis made changes -
        Attachment 348-2.patch [ 12415866 ]
        Mark Robson made changes -
        Attachment LoadAndScan.py [ 12415832 ]
        Jonathan Ellis made changes -
        Attachment 348.diff [ 12415744 ]
        Mark Robson made changes -
        Field Original Value New Value
        Attachment setup.cas [ 12415723 ]
        Mark Robson created issue -

          People

          • Assignee:
            Jonathan Ellis
            Reporter:
            Mark Robson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development