Skip to content

Commit d5896b9

Browse files
committed
CC5 fix MixedIndexImplementationTest.shouldNotBeSelectedForCustomExpressions, changing default value of StorageAttachedIndexOptions.prioritize_over_legacy_index to 'true'.
The prioritize_over_legacy_index was introduced in 5.0.4 by CASSANDRA-20334 using a default of 'false'
1 parent d122c73 commit d5896b9

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/java/org/apache/cassandra/config/StorageAttachedIndexOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class StorageAttachedIndexOptions
3434
public double zerocopy_used_threshold = DEFAULT_ZEROCOPY_USED_THRESHOLD;
3535
public double ann_brute_force_factor = DEFAULT_ANN_BRUTE_FORCE_FACTOR;
3636

37-
public volatile boolean prioritize_over_legacy_index = false;
37+
public volatile boolean prioritize_over_legacy_index = true;
3838

3939
public void validate()
4040
{

test/unit/org/apache/cassandra/index/sai/metrics/IndexSelectionTest.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
package org.apache.cassandra.index.sai.metrics;
2020

21+
import org.junit.AfterClass;
22+
import org.junit.BeforeClass;
2123
import org.junit.Test;
2224

2325
import org.apache.cassandra.config.DatabaseDescriptor;
@@ -26,6 +28,18 @@
2628

2729
public class IndexSelectionTest extends AbstractMetricsTest
2830
{
31+
@BeforeClass
32+
public static void setPrioritizeSAIOverLegacyIndex()
33+
{
34+
DatabaseDescriptor.setPrioritizeSAIOverLegacyIndex(false);
35+
}
36+
37+
@AfterClass
38+
public static void unsetPrioritizeSAIOverLegacyIndex()
39+
{
40+
DatabaseDescriptor.setPrioritizeSAIOverLegacyIndex(true);
41+
}
42+
2943
@Test
3044
public void shouldSelectLegacyIndexByDefault()
3145
{

0 commit comments

Comments
 (0)