[ https://issues.apache.org/jira/browse/FLINK-24460?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yun Tang resolved FLINK-24460. ------------------------------ Fix Version/s: 1.14.1 1.15.0 Resolution: Fixed merged in master: 77b8e9c042d1d4d2779afc7edaf0d33334ae9eaa merged in release-1.14: 1f17b28f4ddb8b3896e1a43de63d83feccf03c65 > Rocksdb Iterator Error Handling Improvement > ------------------------------------------- > > Key: FLINK-24460 > URL: https://issues.apache.org/jira/browse/FLINK-24460 > Project: Flink > Issue Type: Improvement > Components: Runtime / State Backends > Affects Versions: 1.14.0 > Reporter: Victor Xu > Assignee: Victor Xu > Priority: Minor > Labels: pull-request-available > Fix For: 1.15.0, 1.14.1 > > > In FLINK-9373, we introduced RocksIteratorWrapper which was a wrapper around > RocksIterator to check the iterator status for all the methods. At that time, > it was required because the iterator may pass the blocks or files it had > difficulties in reading (because of IO errors, data corruptions, or other > issues) and continue with the next available keys. *The status flag may not > be OK, even if the iterator is valid.* > However, the above behaviour changed after > [3810|https://github.com/facebook/rocksdb/pull/3810] was merged on May 17, > 2018: > *- If the iterator is valid, the status() is guaranteed to be OK;* > *- If the iterator is not valid, there are two possibilities:* > *1) We have reached the end of the data. And in this case, status() is > OK;* > *2) There is an error. In this case, status() is not OK;* > More information can be found here: > https://github.com/facebook/rocksdb/wiki/Iterator#error-handling > Thus, it should be safe to proceed with other operations (e.g. seek, next, > seekToFirst, seekToLast, seekForPrev, and prev) without checking status(). > And we only need to check the status if the iterator is invalid. After the > change, there will be less status() native calls and could theoretically > improve performance. > -- This message was sent by Atlassian Jira (v8.3.4#803005)