mirror of https://github.com/apache/cassandra
Dont cast expected bloom filter size to int
Patch by marcuse; reviewed by Jason Brown for CASSANDRA-9959
This commit is contained in:
parent
878d616427
commit
45bd07f6fe
|
|
@ -1,4 +1,5 @@
|
|||
2.0.17
|
||||
* Don't cast expected bf size to an int (CASSANDRA-9959)
|
||||
* Log when messages are dropped due to cross_node_timeout (CASSANDRA-9793)
|
||||
* checkForEndpointCollision fails for legitimate collisions (CASSANDRA-9765)
|
||||
* Complete CASSANDRA-8448 fix (CASSANDRA-9519)
|
||||
|
|
|
|||
|
|
@ -553,8 +553,8 @@ public class CompactionManager implements CompactionManagerMBean
|
|||
|
||||
long totalkeysWritten = 0;
|
||||
|
||||
int expectedBloomFilterSize = Math.max(cfs.metadata.getIndexInterval(),
|
||||
(int) (SSTableReader.getApproximateKeyCount(sstableAsSet, cfs.metadata)));
|
||||
long expectedBloomFilterSize = Math.max(cfs.metadata.getIndexInterval(),
|
||||
SSTableReader.getApproximateKeyCount(sstableAsSet, cfs.metadata));
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Expected bloom filter size : " + expectedBloomFilterSize);
|
||||
|
||||
|
|
@ -734,7 +734,7 @@ public class CompactionManager implements CompactionManagerMBean
|
|||
|
||||
public static SSTableWriter createWriter(ColumnFamilyStore cfs,
|
||||
File compactionFileLocation,
|
||||
int expectedBloomFilterSize,
|
||||
long expectedBloomFilterSize,
|
||||
SSTableReader sstable)
|
||||
{
|
||||
FileUtils.createDirectory(compactionFileLocation);
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public class Scrubber implements Closeable
|
|||
|
||||
private final CompactionController controller;
|
||||
private final boolean isCommutative;
|
||||
private final int expectedBloomFilterSize;
|
||||
private final long expectedBloomFilterSize;
|
||||
|
||||
private final RandomAccessReader dataFile;
|
||||
private final RandomAccessReader indexFile;
|
||||
|
|
@ -105,7 +105,7 @@ public class Scrubber implements Closeable
|
|||
}
|
||||
|
||||
this.expectedBloomFilterSize = Math.max(cfs.metadata.getIndexInterval(),
|
||||
hasIndexFile ? (int)(SSTableReader.getApproximateKeyCount(toScrub,cfs.metadata)) : 0);
|
||||
hasIndexFile ? SSTableReader.getApproximateKeyCount(toScrub, cfs.metadata) : 0);
|
||||
|
||||
// loop through each row, deserializing to check for damage.
|
||||
// we'll also loop through the index at the same time, using the position from the index to recover if the
|
||||
|
|
|
|||
Loading…
Reference in New Issue