[ 
https://issues.apache.org/jira/browse/CASSANDRA-21423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18109723#comment-18109723
 ] 

Isaac Philip Liu commented on CASSANDRA-21423:
----------------------------------------------

Initial patch is ready for review 
[here|https://github.com/apache/cassandra/pull/4929]:

Changes since the initial approach plus two corrections:

- Unsorted writer buffers partitions in an in-memory TreeMap, so it knows the 
exact key count at flush time. The rebuild only runs for the sorted writer, 
where the count is unknowable at creation.
- Rebuild lives in AbstractSSTableSimpleWriter.rebuildBloomFilter() rather than 
on SSTableReaderLoadingBuilder. It still reuses the per-format key-reading 
infra via the loading builder, but adds no new API to it.
- Sizing now for rebuildBloomFilter() uses the exact partition count 
(estimatedPartitionSize.count() from Statistics.db) instead of totalRows, so 
the filter is sized for the real count rather than an upper bound.

Everything else is as described above.

> CQLSSTableWriter produces empty bloom filter
> --------------------------------------------
>
>                 Key: CASSANDRA-21423
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-21423
>             Project: Apache Cassandra
>          Issue Type: Improvement
>            Reporter: Lukasz Antoniak
>            Assignee: Isaac Philip Liu
>            Priority: Normal
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> CQLSSTableWriter produces empty Filter.db files when flushing SSTables. This 
> causes Cassandra nodes to skip Bloom filter checks on imported SSTables, 
> resulting in unnecessary disk reads for every partition key lookup.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to