You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sa...@apache.org on 2020/03/11 10:38:32 UTC

[cassandra] branch trunk updated (1916e5d -> 8ebe72d)

This is an automated email from the ASF dual-hosted git repository.

samt pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git.


    from 1916e5d  Add UnleveledSSTables table level metric
     new c81d7dc  Use result size for built index test
     new 8a5b127  Merge branch 'cassandra-3.0' into cassandra-3.11
     new 8ebe72d  Merge branch 'cassandra-3.11' into trunk

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../index/internal/CassandraIndexTest.java         | 23 ++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


[cassandra] 01/01: Merge branch 'cassandra-3.11' into trunk

Posted by sa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

samt pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git

commit 8ebe72d853c18d62f3e50f39736330b2bf141518
Merge: 1916e5d 8a5b127
Author: Sam Tunnicliffe <sa...@beobal.com>
AuthorDate: Wed Mar 11 10:29:33 2020 +0000

    Merge branch 'cassandra-3.11' into trunk

 .../index/internal/CassandraIndexTest.java         | 23 ++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

diff --cc test/unit/org/apache/cassandra/index/internal/CassandraIndexTest.java
index 65c2417,b573e6f..bab2eb2
--- a/test/unit/org/apache/cassandra/index/internal/CassandraIndexTest.java
+++ b/test/unit/org/apache/cassandra/index/internal/CassandraIndexTest.java
@@@ -496,24 -526,32 +502,33 @@@ public class CassandraIndexTest extend
          createIndex(String.format("CREATE INDEX %s ON %%s(c)", indexName));
          waitForIndex(KEYSPACE, tableName, indexName);
          // check that there are no other rows in the built indexes table
-         assertRows(execute(String.format("SELECT * FROM %s.\"%s\"", SchemaConstants.SYSTEM_KEYSPACE_NAME, SystemKeyspace.BUILT_INDEXES)),
-                    row(KEYSPACE, indexName, null));
+         rs = execute(selectBuiltIndexesQuery);
+         int sizeAfterBuild = rs.size();
 -        assertRowsIgnoringOrderAndExtra(rs, row(KEYSPACE, indexName));
++        assertRowsIgnoringOrderAndExtra(rs, row(KEYSPACE, indexName, null));
  
          // rebuild the index and verify the built status table
          getCurrentColumnFamilyStore().rebuildSecondaryIndex(indexName);
          waitForIndex(KEYSPACE, tableName, indexName);
  
          // check that there are no other rows in the built indexes table
-         assertRows(execute(String.format("SELECT * FROM %s.\"%s\"", SchemaConstants.SYSTEM_KEYSPACE_NAME, SystemKeyspace.BUILT_INDEXES)),
-                    row(KEYSPACE, indexName, null ));
+         rs = execute(selectBuiltIndexesQuery);
+         assertEquals(sizeAfterBuild, rs.size());
 -        assertRowsIgnoringOrderAndExtra(rs, row(KEYSPACE, indexName));
++        assertRowsIgnoringOrderAndExtra(rs, row(KEYSPACE, indexName, null));
+ 
+         // check that dropping the index removes it from the built indexes table
+         dropIndex("DROP INDEX %s." + indexName);
+         rs = execute(selectBuiltIndexesQuery);
+         assertEquals(initialSize, rs.size());
+         rs.forEach(row -> assertFalse(row.getString("table_name").equals(KEYSPACE)  // table_name is actually keyspace
+                                       && row.getString("index_name").equals(indexName)));
      }
  
 +
      // this is slightly annoying, but we cannot read rows from the methods in Util as
 -    // ReadCommand#executeInternal uses metadata retrieved via the cfId, which the index
 +    // ReadCommand#executeLocally uses metadata retrieved via the tableId, which the index
      // CFS inherits from the base CFS. This has the 'wrong' partitioner (the index table
      // uses LocalPartition, the base table a real one, so we cannot read from the index
 -    // table with executeInternal
 +    // table with executeLocally
      private void assertIndexRowTtl(ColumnFamilyStore indexCfs, int indexedValue, int ttl) throws Throwable
      {
          DecoratedKey indexKey = indexCfs.decorateKey(ByteBufferUtil.bytes(indexedValue));


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org