mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0: Fix KeyCacheTest for cases when early open is disabled
This commit is contained in:
commit
37d2ef11d6
|
|
@ -340,12 +340,11 @@ public class KeyCacheTest
|
||||||
throw new IllegalStateException();
|
throw new IllegalStateException();
|
||||||
|
|
||||||
Util.compactAll(cfs, Integer.MAX_VALUE).get();
|
Util.compactAll(cfs, Integer.MAX_VALUE).get();
|
||||||
boolean noEarlyOpen = DatabaseDescriptor.getSSTablePreemptiveOpenIntervalInMiB() < 0;
|
|
||||||
|
|
||||||
// after compaction cache should have entries for new SSTables,
|
// after compaction cache should have entries for new SSTables,
|
||||||
// but since we have kept a reference to the old sstables,
|
// but since we have kept a reference to the old sstables,
|
||||||
// if we had 2 keys in cache previously it should become 4
|
// if we had 2 keys in cache previously it should become 4
|
||||||
assertKeyCacheSize(noEarlyOpen ? 2 : 4, KEYSPACE1, cf);
|
assertKeyCacheSize(4, KEYSPACE1, cf);
|
||||||
|
|
||||||
refs.release();
|
refs.release();
|
||||||
|
|
||||||
|
|
@ -358,7 +357,7 @@ public class KeyCacheTest
|
||||||
Util.getAll(Util.cmd(cfs, "key1").build());
|
Util.getAll(Util.cmd(cfs, "key1").build());
|
||||||
Util.getAll(Util.cmd(cfs, "key2").build());
|
Util.getAll(Util.cmd(cfs, "key2").build());
|
||||||
|
|
||||||
assertKeyCacheSize(noEarlyOpen ? 4 : 2, KEYSPACE1, cf);
|
assertKeyCacheSize( 2, KEYSPACE1, cf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue