alex-ninja commented on a change in pull request #1098:
URL: https://github.com/apache/cassandra/pull/1098#discussion_r667220087
##########
File path:
test/memory/org/apache/cassandra/db/compaction/CompactionAllocationTest.java
##########
@@ -764,4 +800,135 @@ public void widePartitionsOverlappingRows3() throws
Throwable
{
testWidePartitions("widePartitionsOverlappingRows3", 3,
maybeInflate(24), true, true);
}
+
+
+ private static void testIndexingWidePartitions(String name,
+ int numSSTable,
+ int sstablePartitions,
+ IndexDef...indexes) throws
Throwable
+ {
+ String ksname = "ks_" + name.toLowerCase();
+ SchemaLoader.createKeyspace(ksname, KeyspaceParams.simple(1),
+ CreateTableStatement.parse("CREATE TABLE tbl (k text, c text,
v1 text, v2 text, v3 text, v4 text, PRIMARY KEY (k, c))", ksname).build());
+
+ ColumnFamilyStore cfs =
Schema.instance.getColumnFamilyStoreInstance(Schema.instance.getTableMetadata(ksname,
"tbl").id);
+ Assert.assertNotNull(cfs);
+ cfs.disableAutoCompaction();
+ int rowWidth = 100;
+ int rowsPerPartition = 1000;
+
+ measure(new Workload()
+ {
+ @SuppressWarnings("UnstableApiUsage")
+ public void setup()
+ {
+ cfs.disableAutoCompaction();
+ String insert = String.format("INSERT INTO %s.%s (k, c, v1,
v2, v3, v4) VALUES (?, ?, ?, ?, ?, ?)", ksname, "tbl");
+ for (int f=0; f<numSSTable; f++)
+ {
+ for (int p = 0; p < sstablePartitions; p++)
+ {
+ String key = String.format("%08d", (f *
sstablePartitions) + p);
+ for (int r=0; r<rowsPerPartition; r++)
Review comment:
nit: missing spaces
##########
File path:
test/memory/org/apache/cassandra/db/compaction/CompactionAllocationTest.java
##########
@@ -764,4 +800,135 @@ public void widePartitionsOverlappingRows3() throws
Throwable
{
testWidePartitions("widePartitionsOverlappingRows3", 3,
maybeInflate(24), true, true);
}
+
+
+ private static void testIndexingWidePartitions(String name,
+ int numSSTable,
+ int sstablePartitions,
+ IndexDef...indexes) throws
Throwable
+ {
+ String ksname = "ks_" + name.toLowerCase();
+ SchemaLoader.createKeyspace(ksname, KeyspaceParams.simple(1),
+ CreateTableStatement.parse("CREATE TABLE tbl (k text, c text,
v1 text, v2 text, v3 text, v4 text, PRIMARY KEY (k, c))", ksname).build());
+
+ ColumnFamilyStore cfs =
Schema.instance.getColumnFamilyStoreInstance(Schema.instance.getTableMetadata(ksname,
"tbl").id);
+ Assert.assertNotNull(cfs);
+ cfs.disableAutoCompaction();
+ int rowWidth = 100;
+ int rowsPerPartition = 1000;
+
+ measure(new Workload()
+ {
+ @SuppressWarnings("UnstableApiUsage")
+ public void setup()
+ {
+ cfs.disableAutoCompaction();
+ String insert = String.format("INSERT INTO %s.%s (k, c, v1,
v2, v3, v4) VALUES (?, ?, ?, ?, ?, ?)", ksname, "tbl");
+ for (int f=0; f<numSSTable; f++)
Review comment:
nit: missing spaces
##########
File path:
test/memory/org/apache/cassandra/db/compaction/CompactionAllocationTest.java
##########
@@ -764,4 +800,135 @@ public void widePartitionsOverlappingRows3() throws
Throwable
{
testWidePartitions("widePartitionsOverlappingRows3", 3,
maybeInflate(24), true, true);
}
+
+
+ private static void testIndexingWidePartitions(String name,
+ int numSSTable,
+ int sstablePartitions,
+ IndexDef...indexes) throws
Throwable
+ {
+ String ksname = "ks_" + name.toLowerCase();
+ SchemaLoader.createKeyspace(ksname, KeyspaceParams.simple(1),
+ CreateTableStatement.parse("CREATE TABLE tbl (k text, c text,
v1 text, v2 text, v3 text, v4 text, PRIMARY KEY (k, c))", ksname).build());
+
+ ColumnFamilyStore cfs =
Schema.instance.getColumnFamilyStoreInstance(Schema.instance.getTableMetadata(ksname,
"tbl").id);
+ Assert.assertNotNull(cfs);
+ cfs.disableAutoCompaction();
+ int rowWidth = 100;
+ int rowsPerPartition = 1000;
+
+ measure(new Workload()
+ {
+ @SuppressWarnings("UnstableApiUsage")
+ public void setup()
+ {
+ cfs.disableAutoCompaction();
Review comment:
is it necessary to disable automatic compaction twice? it has been
already done on line 816.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]