kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sophie Blee-Goldman (JIRA)" <j...@apache.org>
Subject [jira] [Created] (KAFKA-8372) Remove deprecated RocksDB#compactRange API
Date Wed, 15 May 2019 22:19:00 GMT
Sophie Blee-Goldman created KAFKA-8372:
------------------------------------------

             Summary: Remove deprecated RocksDB#compactRange API
                 Key: KAFKA-8372
                 URL: https://issues.apache.org/jira/browse/KAFKA-8372
             Project: Kafka
          Issue Type: Improvement
          Components: streams
    Affects Versions: 3.0.0
            Reporter: Sophie Blee-Goldman


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
(v7.6.3#76005)

Mime
View raw message