You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/05/16 07:52:00 UTC

[jira] [Commented] (FLINK-9373) Always call RocksIterator.status() to check the internal error of RocksDB

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

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

GitHub user sihuazhou opened a pull request:

    https://github.com/apache/flink/pull/6020

    [FLINK-9373][state] Always call RocksIterator.status() to check the internal error of RocksDB

    ## What is the purpose of the change
    
    Currently, when using RocksIterator we only use the `iterator.isValid()` to check whether we have reached the end of the iterator. But that is not enough, if we refer to RocksDB's wiki https://github.com/facebook/rocksdb/wiki/Iterator#error-handling we should find that even if `iterator.isValid()=true`, there may also exist some internal errors. A safer way to use the `RocksIterator` is to always call the `iterator.status()` to check the internal error of RocksDB. There is one case from user email seems to lost data because of this http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Missing-MapState-when-Timer-fires-after-restored-state-td20134.html (I'm not so sure yet)
    
    ## Brief change log
    
      - *Always call RocksIterator.status() to check the internal error of RocksDB*
    
    
    ## Verifying this change
    
    This change is a trivial rework / code cleanup without any test coverage.
    
    ## Does this pull request potentially affect one of the following parts:
    
      - Dependencies (does it add or upgrade a dependency): (no)
      - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no)
      - The serializers: (no)
      - The runtime per-record code paths (performance sensitive): (no)
      - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
      - The S3 file system connector: (no)
    
    ## Documentation
    
      - Does this pull request introduce a new feature? (no)


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sihuazhou/flink FLINK-9373

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/6020.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #6020
    
----
commit b1d531949d521bb7d72cd389dfe72a4a5cf1bfc9
Author: sihuazhou <su...@...>
Date:   2018-05-16T07:47:05Z

    Always call RocksIterator.status() to check the internal error of RocksDB

----


> Always call RocksIterator.status() to check the internal error of RocksDB
> -------------------------------------------------------------------------
>
>                 Key: FLINK-9373
>                 URL: https://issues.apache.org/jira/browse/FLINK-9373
>             Project: Flink
>          Issue Type: Bug
>          Components: State Backends, Checkpointing
>    Affects Versions: 1.5.0
>            Reporter: Sihua Zhou
>            Assignee: Sihua Zhou
>            Priority: Blocker
>
> Currently, when using RocksIterator we only use the _iterator.isValid()_ to check whether we have reached the end of the iterator. But that is not enough, if we refer to RocksDB's wiki https://github.com/facebook/rocksdb/wiki/Iterator#error-handling we should find that even if _iterator.isValid()=true_, there may also exist some internal error. A safer way to use the _RocksIterator_ is to always call the _iterator.status()_ to check the internal error of _RocksDB_. There is a case from user email seems to lost data because of this http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Missing-MapState-when-Timer-fires-after-restored-state-td20134.html



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