David Hrbacek created FLINK-30475:
-------------------------------------

             Summary: Improved speed of RocksDBMapState clear() using 
rocksDB.deleteRange
                 Key: FLINK-30475
                 URL: https://issues.apache.org/jira/browse/FLINK-30475
             Project: Flink
          Issue Type: Improvement
          Components: Runtime / State Backends
    Affects Versions: 1.16.0
            Reporter: David Hrbacek


Currently {{RocksDBMapState#clear()}} is processed via keyRange traversing and 
inserting particular keys into BatchWrite for deletion.

RocksDb offer much faster way how to delete key range - {{deleteRange}}

This issue is follow-up for 
[FLINK-9070|https://issues.apache.org/jira/browse/FLINK-9070] where 
{{deleteRange}} was also considered. But at that time it implied slower read, 
it was buggy and not even available in the Java API of RocksDB. All of these 
problems were solved since that time (see also RocksDB [blog article for 
deleteRange|https://rocksdb.org/blog/2018/11/21/delete-range.html])

Delete range enables to clear {{RocksDBMapState}} for one key in constant 
computational complexity whereas the old solution requires O(n ).



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

Reply via email to