You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by GitBox <gi...@apache.org> on 2021/04/08 23:38:38 UTC

[GitHub] [gobblin] sv2000 opened a new pull request #3256: GOBBLIN-1420: Log uncaught exceptions from StreamModelTaskRunner

sv2000 opened a new pull request #3256:
URL: https://github.com/apache/gobblin/pull/3256


   Dear Gobblin maintainers,
   
   Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!
   
   
   ### JIRA
   - [x] My PR addresses the following [Gobblin JIRA](https://issues.apache.org/jira/browse/GOBBLIN/) issues and references them in the PR title. For example, "[GOBBLIN-XXX] My Gobblin PR"
       - https://issues.apache.org/jira/browse/GOBBLIN-1420
   
   
   ### Description
   - [x] Here are some details about my PR, including screenshots (if applicable):
   StreamModelTaskRunner submits a thread that consumes and processes records in the streaming mode. Currently, this thread can die silently in case of an uncaught exception (e.g. OOMEs), leaving no trace of the exception. 
   
   ### Tests
   - [x] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason:
   The proposed change only sets the UncaughtExceptionHandler for the thread created by StreamModelTaskRunner. Existing unit tests should cover the changes proposed in this PR.
   
   ### Commits
   - [x] My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)":
       1. Subject is separated from body by a blank line
       2. Subject is limited to 50 characters
       3. Subject does not end with a period
       4. Subject uses the imperative mood ("add", not "adding")
       5. Body wraps at 72 characters
       6. Body explains "what" and "why", not "how"
   
   


-- 
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.

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



[GitHub] [gobblin] codecov-io commented on pull request #3256: GOBBLIN-1420: Log uncaught exceptions from StreamModelTaskRunner

Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #3256:
URL: https://github.com/apache/gobblin/pull/3256#issuecomment-819153014


   # [Codecov](https://codecov.io/gh/apache/gobblin/pull/3256?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#3256](https://codecov.io/gh/apache/gobblin/pull/3256?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2c3e156) into [master](https://codecov.io/gh/apache/gobblin/commit/d9ae5353c74fdcd385835fca9b586b3fdb90971b?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d9ae535) will **decrease** coverage by `37.42%`.
   > The diff coverage is `0.00%`.
   
   > :exclamation: Current head 2c3e156 differs from pull request most recent head a705757. Consider uploading reports for the commit a705757 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/gobblin/pull/3256/graphs/tree.svg?width=650&height=150&src=pr&token=4MgURJ0bGc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/gobblin/pull/3256?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #3256       +/-   ##
   ============================================
   - Coverage     46.42%   9.00%   -37.43%     
   + Complexity     9974    1736     -8238     
   ============================================
     Files          2034    2034               
     Lines         79042   79086       +44     
     Branches       8809    8816        +7     
   ============================================
   - Hits          36692    7118    -29574     
   - Misses        38938   71269    +32331     
   + Partials       3412     699     -2713     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/gobblin/pull/3256?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [...org/apache/gobblin/iceberg/GobblinMCEProducer.java](https://codecov.io/gh/apache/gobblin/pull/3256/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1pY2ViZXJnL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2ljZWJlcmcvR29iYmxpbk1DRVByb2R1Y2VyLmphdmE=) | `0.00% <0.00%> (-48.49%)` | `0.00 <0.00> (-12.00)` | |
   | [...gobblin/iceberg/publisher/GobblinMCEPublisher.java](https://codecov.io/gh/apache/gobblin/pull/3256/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1pY2ViZXJnL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2ljZWJlcmcvcHVibGlzaGVyL0dvYmJsaW5NQ0VQdWJsaXNoZXIuamF2YQ==) | `0.00% <0.00%> (-63.34%)` | `0.00 <0.00> (-12.00)` | |
   | [.../gobblin/iceberg/writer/IcebergMetadataWriter.java](https://codecov.io/gh/apache/gobblin/pull/3256/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1pY2ViZXJnL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2ljZWJlcmcvd3JpdGVyL0ljZWJlcmdNZXRhZGF0YVdyaXRlci5qYXZh) | `0.00% <0.00%> (-67.59%)` | `0.00 <0.00> (-51.00)` | |
   | [...che/gobblin/kafka/client/Kafka1ConsumerClient.java](https://codecov.io/gh/apache/gobblin/pull/3256/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1tb2R1bGVzL2dvYmJsaW4ta2Fma2EtMS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZ29iYmxpbi9rYWZrYS9jbGllbnQvS2Fma2ExQ29uc3VtZXJDbGllbnQuamF2YQ==) | `0.00% <0.00%> (-23.72%)` | `0.00 <0.00> (-6.00)` | |
   | [.../apache/gobblin/runtime/StreamModelTaskRunner.java](https://codecov.io/gh/apache/gobblin/pull/3256/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1ydW50aW1lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3J1bnRpbWUvU3RyZWFtTW9kZWxUYXNrUnVubmVyLmphdmE=) | `0.00% <0.00%> (-82.70%)` | `0.00 <0.00> (-12.00)` | |
   | [...pache/gobblin/runtime/kafka/HighLevelConsumer.java](https://codecov.io/gh/apache/gobblin/pull/3256/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1ydW50aW1lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3J1bnRpbWUva2Fma2EvSGlnaExldmVsQ29uc3VtZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (ø)` | |
   | [...c/main/java/org/apache/gobblin/util/FileUtils.java](https://codecov.io/gh/apache/gobblin/pull/3256/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi11dGlsaXR5L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3V0aWwvRmlsZVV0aWxzLmphdmE=) | `0.00% <0.00%> (-100.00%)` | `0.00% <0.00%> (-4.00%)` | |
   | [...n/java/org/apache/gobblin/fork/CopyableSchema.java](https://codecov.io/gh/apache/gobblin/pull/3256/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2ZvcmsvQ29weWFibGVTY2hlbWEuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | `0.00% <0.00%> (-2.00%)` | |
   | [...java/org/apache/gobblin/stream/ControlMessage.java](https://codecov.io/gh/apache/gobblin/pull/3256/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dvYmJsaW4vc3RyZWFtL0NvbnRyb2xNZXNzYWdlLmphdmE=) | `0.00% <0.00%> (-100.00%)` | `0.00% <0.00%> (-1.00%)` | |
   | [...va/org/apache/gobblin/dataset/DatasetResolver.java](https://codecov.io/gh/apache/gobblin/pull/3256/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dvYmJsaW4vZGF0YXNldC9EYXRhc2V0UmVzb2x2ZXIuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | `0.00% <0.00%> (-3.00%)` | |
   | ... and [1081 more](https://codecov.io/gh/apache/gobblin/pull/3256/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/gobblin/pull/3256?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/gobblin/pull/3256?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [d9ae535...a705757](https://codecov.io/gh/apache/gobblin/pull/3256?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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.

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



[GitHub] [gobblin] autumnust commented on a change in pull request #3256: GOBBLIN-1420: Log uncaught exceptions from StreamModelTaskRunner

Posted by GitBox <gi...@apache.org>.
autumnust commented on a change in pull request #3256:
URL: https://github.com/apache/gobblin/pull/3256#discussion_r614254766



##########
File path: gobblin-runtime/src/main/java/org/apache/gobblin/runtime/StreamModelTaskRunner.java
##########
@@ -151,9 +152,11 @@ protected void run() throws Exception {
         this.task.configureStreamingFork(fork);
       }
     }
-    new Thread(() -> {

Review comment:
       If that's the case, why not create scheduler anyway (without looking at `isForkAsync`) ? Wrapping thread on top of rxjava doesn't seem to be right. 




-- 
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.

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



[GitHub] [gobblin] autumnust commented on a change in pull request #3256: GOBBLIN-1420: Log uncaught exceptions from StreamModelTaskRunner

Posted by GitBox <gi...@apache.org>.
autumnust commented on a change in pull request #3256:
URL: https://github.com/apache/gobblin/pull/3256#discussion_r613390804



##########
File path: gobblin-runtime/src/main/java/org/apache/gobblin/runtime/StreamModelTaskRunner.java
##########
@@ -151,9 +152,11 @@ protected void run() throws Exception {
         this.task.configureStreamingFork(fork);
       }
     }
-    new Thread(() -> {

Review comment:
       Just curious: What was the motivation to put this line alone in a new thread? isn't the `connect()` an async 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.

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



[GitHub] [gobblin] ZihanLi58 commented on pull request #3256: GOBBLIN-1420: Log uncaught exceptions from StreamModelTaskRunner

Posted by GitBox <gi...@apache.org>.
ZihanLi58 commented on pull request #3256:
URL: https://github.com/apache/gobblin/pull/3256#issuecomment-817985208


   LGTM overall, can you check the failed tests?


-- 
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.

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



[GitHub] [gobblin] sv2000 commented on pull request #3256: GOBBLIN-1420: Log uncaught exceptions from StreamModelTaskRunner

Posted by GitBox <gi...@apache.org>.
sv2000 commented on pull request #3256:
URL: https://github.com/apache/gobblin/pull/3256#issuecomment-817149131


   @ZihanLi58 Please review.


-- 
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.

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



[GitHub] [gobblin] sv2000 closed pull request #3256: GOBBLIN-1420: Log uncaught exceptions from StreamModelTaskRunner

Posted by GitBox <gi...@apache.org>.
sv2000 closed pull request #3256:
URL: https://github.com/apache/gobblin/pull/3256


   


-- 
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.

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



[GitHub] [gobblin] ZihanLi58 commented on a change in pull request #3256: GOBBLIN-1420: Log uncaught exceptions from StreamModelTaskRunner

Posted by GitBox <gi...@apache.org>.
ZihanLi58 commented on a change in pull request #3256:
URL: https://github.com/apache/gobblin/pull/3256#discussion_r613450813



##########
File path: gobblin-runtime/src/main/java/org/apache/gobblin/runtime/StreamModelTaskRunner.java
##########
@@ -151,9 +152,11 @@ protected void run() throws Exception {
         this.task.configureStreamingFork(fork);
       }
     }
-    new Thread(() -> {

Review comment:
       Since we are single fork in this case, isForkAsync is false and we don't call observeOn method which cause the connect() method is not an async call and will hang forever until error/finished. It's changed in this PR https://github.com/apache/gobblin/pull/3214/files 




-- 
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.

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



[GitHub] [gobblin] asfgit closed pull request #3256: GOBBLIN-1420: Log uncaught exceptions from StreamModelTaskRunner

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #3256:
URL: https://github.com/apache/gobblin/pull/3256


   


-- 
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.

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



[GitHub] [gobblin] sv2000 closed pull request #3256: GOBBLIN-1420: Log uncaught exceptions from StreamModelTaskRunner

Posted by GitBox <gi...@apache.org>.
sv2000 closed pull request #3256:
URL: https://github.com/apache/gobblin/pull/3256


   


-- 
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.

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