flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-8639) Fix always need to seek multiple times when iterator RocksDBMapState
Date Mon, 19 Feb 2018 15:07:00 GMT

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

ASF GitHub Bot commented on FLINK-8639:
---------------------------------------

Github user StefanRRichter commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5465#discussion_r169099948
  
    --- Diff: flink-contrib/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBMapState.java
---
    @@ -520,7 +530,7 @@ private boolean underSameKey(byte[] rawKeyBytes) {
     				return false;
     			}
     
    -			for (int i = 0; i < keyPrefixBytes.length; ++i) {
    +			for (int i = keyPrefixBytes.length - 1; i >= backend.getKeyGroupPrefixBytes();
--i) {
    --- End diff --
    
    nit: maybe `for (int i = keyPrefixBytes.length; --i >= backend.getKeyGroupPrefixBytes();)`
looks a bit cleaner.


> Fix always need to seek multiple times when iterator RocksDBMapState
> --------------------------------------------------------------------
>
>                 Key: FLINK-8639
>                 URL: https://issues.apache.org/jira/browse/FLINK-8639
>             Project: Flink
>          Issue Type: Improvement
>          Components: State Backends, Checkpointing
>    Affects Versions: 1.4.0
>            Reporter: Sihua Zhou
>            Assignee: Sihua Zhou
>            Priority: Critical
>             Fix For: 1.5.0
>
>
> Currently, almost every time we want to iterator a RocksDBMapState we need to do seek
at least 2 times (Seek is a poor performance action for rocksdb cause it can't use the bloomfilter).
This is because `RocksDBMapIterator` use a `cacheEntries` to cache the seek values every time
and the `cacheEntries`'s init size is 1.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message