You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "A. Sophie Blee-Goldman (Jira)" <ji...@apache.org> on 2021/03/23 02:49:00 UTC
[jira] [Resolved] (KAFKA-8372) Remove deprecated
RocksDB#compactRange API
[ https://issues.apache.org/jira/browse/KAFKA-8372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
A. Sophie Blee-Goldman resolved KAFKA-8372.
-------------------------------------------
Resolution: Fixed
We can just close this since we removed bulk loading, and the use of compactRange(), back in 2.6
> Remove deprecated RocksDB#compactRange API
> ------------------------------------------
>
> Key: KAFKA-8372
> URL: https://issues.apache.org/jira/browse/KAFKA-8372
> Project: Kafka
> Issue Type: Improvement
> Components: streams
> Reporter: A. Sophie Blee-Goldman
> Priority: Blocker
> Fix For: 3.0.0
>
>
> In upgrading Rocks from v5.15 to v5.18, several of the RocksDB#compactRange() methods were deprecated in favor of variations leveraging the new CompactRangeOptions object. However v5.18 left a gap in the API with no signature allowing you to pass in an options object without also passing it a start, end byte[] specifying a range to be compacted. Since we would like to compact the entire thing and not a subrange, while needing to specify several options, the deprecation warning was suppressed for now.
> In v6.0 this gap is closed as you can pass null in for start, end to specify that the entire range should be compacted.
> When upgrading Rocks to v6.0 or later, the deprecation suppressions should be removed from DualColumnFamilyAccessor#toggleDBForBulkLoading() (RocksDBTimestampedStore.java) and and SingleColumnFamilyAccessor#toggleDBForBulkLoading() (RocksDBStore.java) and the following replacement should be made:
>
> db.compactRange(columnFamily, true, 1, 0)
> -->
> db.compactRange(columnFamily, null, null, CompactRangeOptions);
>
> NOTE: CompactRangeOptions extend RocksObject and as such should be closed to avoid leaking memory!
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)