You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/10/06 10:57:42 UTC

[GitHub] [flink] victorunique opened a new pull request #17419: [FLINK-24460][rocksdb] Rocksdb Iterator Error Handling Improvement

victorunique opened a new pull request #17419:
URL: https://github.com/apache/flink/pull/17419


   ## What is the purpose of the change
   
   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 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
   
   
   ## Brief change log
   
     - *Remove all the status() calls from existing methods*
     - *Add status() check when the iterator is invalid (as per the best practice in the rocksdb wiki above)*
     - *Update the comments of RocksIteratorWrapper for this change*
   
   
   ## 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, Kubernetes/Yarn, ZooKeeper: (no)
     - The S3 file system connector: (no)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (no)
     - If yes, how is the feature documented? (not applicable)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #17419: [FLINK-24460][rocksdb] Rocksdb Iterator Error Handling Improvement

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #17419:
URL: https://github.com/apache/flink/pull/17419#issuecomment-936009567


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "cfbc2918576e98b21f46dad6786059b7260e9b5d",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "cfbc2918576e98b21f46dad6786059b7260e9b5d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * cfbc2918576e98b21f46dad6786059b7260e9b5d UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] Myasuka commented on a change in pull request #17419: [FLINK-24460][rocksdb] Rocksdb Iterator Error Handling Improvement

Posted by GitBox <gi...@apache.org>.
Myasuka commented on a change in pull request #17419:
URL: https://github.com/apache/flink/pull/17419#discussion_r727686247



##########
File path: flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksIteratorWrapper.java
##########
@@ -111,7 +114,6 @@ public void status() {
     @Override
     public void refresh() throws RocksDBException {
         iterator.refresh();
-        status();

Review comment:
       I think we'd better leave the `status()` check for `refresh()` API here.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17419: [FLINK-24460][rocksdb] Rocksdb Iterator Error Handling Improvement

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17419:
URL: https://github.com/apache/flink/pull/17419#issuecomment-936009567


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "cfbc2918576e98b21f46dad6786059b7260e9b5d",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24800",
       "triggerID" : "cfbc2918576e98b21f46dad6786059b7260e9b5d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * cfbc2918576e98b21f46dad6786059b7260e9b5d Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24800) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] victorunique commented on a change in pull request #17419: [FLINK-24460][rocksdb] Rocksdb Iterator Error Handling Improvement

Posted by GitBox <gi...@apache.org>.
victorunique commented on a change in pull request #17419:
URL: https://github.com/apache/flink/pull/17419#discussion_r727866415



##########
File path: flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksIteratorWrapper.java
##########
@@ -111,7 +114,6 @@ public void status() {
     @Override
     public void refresh() throws RocksDBException {
         iterator.refresh();
-        status();

Review comment:
       Thanks for your feedback. Can you please elaborate on why we need to leave status() in this refresh() method? Is that due to the comment in the RocksIteratorInterface ("_If supported, renew the iterator to represent the latest state. The iterator will be invalidated after the call._")?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17419: [FLINK-24460][rocksdb] Rocksdb Iterator Error Handling Improvement

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17419:
URL: https://github.com/apache/flink/pull/17419#issuecomment-936009567


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "cfbc2918576e98b21f46dad6786059b7260e9b5d",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24800",
       "triggerID" : "cfbc2918576e98b21f46dad6786059b7260e9b5d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * cfbc2918576e98b21f46dad6786059b7260e9b5d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24800) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17419: [FLINK-24460][rocksdb] Rocksdb Iterator Error Handling Improvement

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17419:
URL: https://github.com/apache/flink/pull/17419#issuecomment-936009567


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "cfbc2918576e98b21f46dad6786059b7260e9b5d",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24800",
       "triggerID" : "cfbc2918576e98b21f46dad6786059b7260e9b5d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "330bbe0cc79879e12084f258054dbdeb67cef4fe",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25008",
       "triggerID" : "330bbe0cc79879e12084f258054dbdeb67cef4fe",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 330bbe0cc79879e12084f258054dbdeb67cef4fe Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25008) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] victorunique commented on a change in pull request #17419: [FLINK-24460][rocksdb] Rocksdb Iterator Error Handling Improvement

Posted by GitBox <gi...@apache.org>.
victorunique commented on a change in pull request #17419:
URL: https://github.com/apache/flink/pull/17419#discussion_r727866415



##########
File path: flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksIteratorWrapper.java
##########
@@ -111,7 +114,6 @@ public void status() {
     @Override
     public void refresh() throws RocksDBException {
         iterator.refresh();
-        status();

Review comment:
       Thanks for your feedback. Can you please elaborate on why we need to leave status() in this refresh() method? Is that due to the comment in the RocksIteratorInterface ("_If supported, renew the iterator to represent the latest state. The iterator will be invalidated after the call._")?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17419: [FLINK-24460][rocksdb] Rocksdb Iterator Error Handling Improvement

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17419:
URL: https://github.com/apache/flink/pull/17419#issuecomment-936009567


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "cfbc2918576e98b21f46dad6786059b7260e9b5d",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24800",
       "triggerID" : "cfbc2918576e98b21f46dad6786059b7260e9b5d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * cfbc2918576e98b21f46dad6786059b7260e9b5d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24800) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17419: [FLINK-24460][rocksdb] Rocksdb Iterator Error Handling Improvement

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17419:
URL: https://github.com/apache/flink/pull/17419#issuecomment-936009567


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "cfbc2918576e98b21f46dad6786059b7260e9b5d",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24800",
       "triggerID" : "cfbc2918576e98b21f46dad6786059b7260e9b5d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "330bbe0cc79879e12084f258054dbdeb67cef4fe",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25008",
       "triggerID" : "330bbe0cc79879e12084f258054dbdeb67cef4fe",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * cfbc2918576e98b21f46dad6786059b7260e9b5d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24800) 
   * 330bbe0cc79879e12084f258054dbdeb67cef4fe Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25008) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17419: [FLINK-24460][rocksdb] Rocksdb Iterator Error Handling Improvement

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17419:
URL: https://github.com/apache/flink/pull/17419#issuecomment-936009567


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "cfbc2918576e98b21f46dad6786059b7260e9b5d",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24800",
       "triggerID" : "cfbc2918576e98b21f46dad6786059b7260e9b5d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "330bbe0cc79879e12084f258054dbdeb67cef4fe",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "330bbe0cc79879e12084f258054dbdeb67cef4fe",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * cfbc2918576e98b21f46dad6786059b7260e9b5d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24800) 
   * 330bbe0cc79879e12084f258054dbdeb67cef4fe UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] Myasuka closed pull request #17419: [FLINK-24460][rocksdb] Rocksdb Iterator Error Handling Improvement

Posted by GitBox <gi...@apache.org>.
Myasuka closed pull request #17419:
URL: https://github.com/apache/flink/pull/17419


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] Myasuka commented on a change in pull request #17419: [FLINK-24460][rocksdb] Rocksdb Iterator Error Handling Improvement

Posted by GitBox <gi...@apache.org>.
Myasuka commented on a change in pull request #17419:
URL: https://github.com/apache/flink/pull/17419#discussion_r727686247



##########
File path: flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksIteratorWrapper.java
##########
@@ -111,7 +114,6 @@ public void status() {
     @Override
     public void refresh() throws RocksDBException {
         iterator.refresh();
-        status();

Review comment:
       I think we'd better leave the `status()` check for `refresh()` API here.

##########
File path: flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksIteratorWrapper.java
##########
@@ -111,7 +114,6 @@ public void status() {
     @Override
     public void refresh() throws RocksDBException {
         iterator.refresh();
-        status();

Review comment:
       The original PR of RocksDB targets for `seek` with `next` operations, I did not take a look at the code implementation of `refresh` yet, but I think it's better to leave the check there. BTW, `refresh` API is not used by Flink yet, we don't have experience of the risk to remove the check. For the purpose of safety, I think we'd better leave the check of `status()` there.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #17419: [FLINK-24460][rocksdb] Rocksdb Iterator Error Handling Improvement

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #17419:
URL: https://github.com/apache/flink/pull/17419#issuecomment-935974041


   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit cfbc2918576e98b21f46dad6786059b7260e9b5d (Wed Oct 06 11:00:18 UTC 2021)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
    * **This pull request references an unassigned [Jira ticket](https://issues.apache.org/jira/browse/FLINK-24460).** According to the [code contribution guide](https://flink.apache.org/contributing/contribute-code.html), tickets need to be assigned before starting with the implementation work.
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17419: [FLINK-24460][rocksdb] Rocksdb Iterator Error Handling Improvement

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17419:
URL: https://github.com/apache/flink/pull/17419#issuecomment-936009567






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] Myasuka commented on a change in pull request #17419: [FLINK-24460][rocksdb] Rocksdb Iterator Error Handling Improvement

Posted by GitBox <gi...@apache.org>.
Myasuka commented on a change in pull request #17419:
URL: https://github.com/apache/flink/pull/17419#discussion_r727881930



##########
File path: flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksIteratorWrapper.java
##########
@@ -111,7 +114,6 @@ public void status() {
     @Override
     public void refresh() throws RocksDBException {
         iterator.refresh();
-        status();

Review comment:
       The original PR of RocksDB targets for `seek` with `next` operations, I did not take a look at the code implementation of `refresh` yet, but I think it's better to leave the check there. BTW, `refresh` API is not used by Flink yet, we don't have experience of the risk to remove the check. For the purpose of safety, I think we'd better leave the check of `status()` there.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org