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

SelectTest fails when run with SAI index

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 5.0-beta1, 5.0, 5.1
    • Feature/SAI
    • None

    Description

      When run with SAI index, the following two tests error out:

      [junit-timeout] Testcase: testContainsKeyAndContainsWithIndexOnMapValue(org.apache.cassandra.cql3.validation.operations.SelectTest)-_jdk11:	FAILED
      [junit-timeout] Got less rows than expected. Expected 1 but got 0
      [junit-timeout] junit.framework.AssertionFailedError: Got less rows than expected. Expected 1 but got 0
      [junit-timeout] 	at org.apache.cassandra.cql3.CQLTester.assertRows(CQLTester.java:1849)
      [junit-timeout] 	at org.apache.cassandra.cql3.validation.operations.SelectTest.lambda$testContainsKeyAndContainsWithIndexOnMapValue$9(SelectTest.java:625)
      [junit-timeout] 	at org.apache.cassandra.cql3.CQLTester.beforeAndAfterFlush(CQLTester.java:2238)
      [junit-timeout] 	at org.apache.cassandra.cql3.validation.operations.SelectTest.testContainsKeyAndContainsWithIndexOnMapValue(SelectTest.java:618)
      [junit-timeout] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [junit-timeout] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      [junit-timeout] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [junit-timeout] 
      [junit-timeout] 
      [junit-timeout] Testcase: testFilterWithIndexForContains(org.apache.cassandra.cql3.validation.operations.SelectTest)-_jdk11:	FAILED
      [junit-timeout] Invalid value for row 1 column 0 (k1 of type int), expected <1> but got <0>
      [junit-timeout] Invalid value for row 1 column 2 (v of type set<int>), expected <{4, 5, 6}> but got <{2, 3, 4}>
      [junit-timeout] 
      [junit-timeout] junit.framework.AssertionFailedError: Invalid value for row 1 column 0 (k1 of type int), expected <1> but got <0>
      [junit-timeout] Invalid value for row 1 column 2 (v of type set<int>), expected <{4, 5, 6}> but got <{2, 3, 4}>
      [junit-timeout] 
      [junit-timeout] 	at org.apache.cassandra.cql3.CQLTester.assertRows(CQLTester.java:1826)
      [junit-timeout] 	at org.apache.cassandra.cql3.validation.operations.SelectTest.lambda$testFilterWithIndexForContains$6(SelectTest.java:543)
      [junit-timeout] 	at org.apache.cassandra.cql3.CQLTester.beforeAndAfterFlush(CQLTester.java:2240)
      [junit-timeout] 	at org.apache.cassandra.cql3.validation.operations.SelectTest.testFilterWithIndexForContains(SelectTest.java:542)
      [junit-timeout] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [junit-timeout] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      [junit-timeout] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      

      The latter seems to be giving the results in the wrong order, and the order flips when the data is flushed.

      Caught during preparation of _latest config that would switch default to SAI (CASSANDRA-18753).

      Attachments

        Issue Links

          Activity

            People

              mike_tr_adamson Mike Adamson
              blambov Branimir Lambov
              Mike Adamson
              Andres de la Peña, Michael Semb Wever
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m