Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-6924

Data Inserted Immediately After Secondary Index Creation is not Indexed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 2.1 beta2
    • Feature/2i Index
    • None
    • Normal

    Description

      The head of the cassandra-1.2 branch (currently 1.2.16-tentative) contains a regression from 1.2.15. Data that is inserted immediately after secondary index creation may never get indexed.

      You can reproduce the issue with a pycassa integration test by running:

      nosetests tests/test_autopacking.py:TestKeyValidators.test_get_indexed_slices
      

      from the pycassa directory.

      The operation order goes like this:

      1. create CF
      2. create secondary index
      3. insert data
      4. query secondary index

      If a short sleep is added in between steps 2 and 3, the data gets indexed and the query is successful.

      If a sleep is only added in between steps 3 and 4, some of the data is never indexed and the query will return incomplete results. This appears to be the case even if the sleep is relatively long (30s), which makes me think the data may never get indexed.

      Attachments

        1. repro.py
          1 kB
          Tom Hobbs
        2. 6924-2.1.txt
          2 kB
          Sam Tunnicliffe

        Activity

          People

            samt Sam Tunnicliffe
            thobbs Tom Hobbs
            Sam Tunnicliffe
            Aleksey Yeschenko
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: