You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "walterddr (via GitHub)" <gi...@apache.org> on 2023/09/26 22:11:29 UTC

[GitHub] [pinot] walterddr opened a new pull request, #11688: [multistage] improve dispatch exception handling

walterddr opened a new pull request, #11688:
URL: https://github.com/apache/pinot/pull/11688

   (no comment)


-- 
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: commits-unsubscribe@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] walterddr commented on a diff in pull request #11688: [multistage] improve dispatch exception handling

Posted by "walterddr (via GitHub)" <gi...@apache.org>.
walterddr commented on code in PR #11688:
URL: https://github.com/apache/pinot/pull/11688#discussion_r1337844975


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/service/SubmissionService.java:
##########
@@ -24,29 +24,30 @@
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
+import org.apache.pinot.common.exception.QueryException;
 
 
 /**
  * Submission service is used to submit multiple runnables and checks the result upon all {@link Future} returns
  * or any failure occurs.
  */
 public class SubmissionService {
-  private final ExecutorService _executor;
   private final List<CompletableFuture<Void>> _futures = new ArrayList<>();
 
-  public SubmissionService(ExecutorService executor) {
-    _executor = executor;
+  public SubmissionService() {

Review Comment:
   good point. will convert it into a util --> its only job is to maintain the list of futures for completion 



-- 
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: commits-unsubscribe@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] codecov-commenter commented on pull request #11688: [multistage] improve dispatch exception handling

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #11688:
URL: https://github.com/apache/pinot/pull/11688#issuecomment-1736412532

   ## [Codecov](https://app.codecov.io/gh/apache/pinot/pull/11688?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   > Merging [#11688](https://app.codecov.io/gh/apache/pinot/pull/11688?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (664f363) into [master](https://app.codecov.io/gh/apache/pinot/commit/e6655dd9d417b46db032e8079691d9201ca59edb?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (e6655dd) will **decrease** coverage by `48.65%`.
   > Report is 10 commits behind head on master.
   > The diff coverage is `0.00%`.
   
   ```diff
   @@              Coverage Diff              @@
   ##             master   #11688       +/-   ##
   =============================================
   - Coverage     63.10%   14.45%   -48.65%     
   + Complexity     1121      201      -920     
   =============================================
     Files          2343     2343               
     Lines        125693   125672       -21     
     Branches      19310    19314        +4     
   =============================================
   - Hits          79315    18164    -61151     
   - Misses        40728   105969    +65241     
   + Partials       5650     1539     -4111     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/pinot/pull/11688/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [integration](https://app.codecov.io/gh/apache/pinot/pull/11688/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [integration1](https://app.codecov.io/gh/apache/pinot/pull/11688/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [integration2](https://app.codecov.io/gh/apache/pinot/pull/11688/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [java-11](https://app.codecov.io/gh/apache/pinot/pull/11688/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `14.45% <0.00%> (-48.60%)` | :arrow_down: |
   | [java-17](https://app.codecov.io/gh/apache/pinot/pull/11688/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [java-20](https://app.codecov.io/gh/apache/pinot/pull/11688/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [temurin](https://app.codecov.io/gh/apache/pinot/pull/11688/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `14.45% <0.00%> (-48.65%)` | :arrow_down: |
   | [unittests](https://app.codecov.io/gh/apache/pinot/pull/11688/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `14.45% <0.00%> (-48.65%)` | :arrow_down: |
   | [unittests1](https://app.codecov.io/gh/apache/pinot/pull/11688/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [unittests2](https://app.codecov.io/gh/apache/pinot/pull/11688/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `14.45% <0.00%> (-0.03%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Files](https://app.codecov.io/gh/apache/pinot/pull/11688?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [.../apache/pinot/query/service/SubmissionService.java](https://app.codecov.io/gh/apache/pinot/pull/11688?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3QtcXVlcnktcnVudGltZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvcXVlcnkvc2VydmljZS9TdWJtaXNzaW9uU2VydmljZS5qYXZh) | `0.00% <0.00%> (-84.62%)` | :arrow_down: |
   | [...apache/pinot/query/service/server/QueryServer.java](https://app.codecov.io/gh/apache/pinot/pull/11688?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3QtcXVlcnktcnVudGltZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvcXVlcnkvc2VydmljZS9zZXJ2ZXIvUXVlcnlTZXJ2ZXIuamF2YQ==) | `0.00% <0.00%> (-80.65%)` | :arrow_down: |
   
   ... and [1533 files with indirect coverage changes](https://app.codecov.io/gh/apache/pinot/pull/11688/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   


-- 
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: commits-unsubscribe@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] walterddr commented on a diff in pull request #11688: [multistage] improve dispatch exception handling

Posted by "walterddr (via GitHub)" <gi...@apache.org>.
walterddr commented on code in PR #11688:
URL: https://github.com/apache/pinot/pull/11688#discussion_r1337954480


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/service/SubmissionService.java:
##########
@@ -24,29 +24,30 @@
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
+import org.apache.pinot.common.exception.QueryException;
 
 
 /**
  * Submission service is used to submit multiple runnables and checks the result upon all {@link Future} returns
  * or any failure occurs.
  */
 public class SubmissionService {
-  private final ExecutorService _executor;
   private final List<CompletableFuture<Void>> _futures = new ArrayList<>();
 
-  public SubmissionService(ExecutorService executor) {
-    _executor = executor;
+  public SubmissionService() {
   }
 
-  public void submit(Runnable runnable) {
-    _futures.add(CompletableFuture.runAsync(runnable, _executor));
+  public void submit(Runnable runnable, ExecutorService executor) {
+    _futures.add(CompletableFuture.runAsync(runnable, executor));
   }
 
-  public void awaitFinish(long deadlineMs)
-      throws Exception {
+  public void awaitFinish(long deadlineMs) {
     CompletableFuture<Void> completableFuture = CompletableFuture.allOf(_futures.toArray(new CompletableFuture[]{}));
     try {
       completableFuture.get(deadlineMs - System.currentTimeMillis(), TimeUnit.MILLISECONDS);
+    } catch (Throwable t) {

Review Comment:
   it shouldn't be but it would be hell of a pain to debug if it did. so just to keep it safe. we should at least have a branch to handle it



-- 
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: commits-unsubscribe@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] Jackie-Jiang commented on a diff in pull request #11688: [multistage] improve dispatch exception handling

Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang commented on code in PR #11688:
URL: https://github.com/apache/pinot/pull/11688#discussion_r1337911460


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/service/SubmissionService.java:
##########
@@ -24,29 +24,30 @@
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
+import org.apache.pinot.common.exception.QueryException;
 
 
 /**
  * Submission service is used to submit multiple runnables and checks the result upon all {@link Future} returns
  * or any failure occurs.
  */
 public class SubmissionService {
-  private final ExecutorService _executor;
   private final List<CompletableFuture<Void>> _futures = new ArrayList<>();
 
-  public SubmissionService(ExecutorService executor) {
-    _executor = executor;
+  public SubmissionService() {
   }
 
-  public void submit(Runnable runnable) {
-    _futures.add(CompletableFuture.runAsync(runnable, _executor));
+  public void submit(Runnable runnable, ExecutorService executor) {
+    _futures.add(CompletableFuture.runAsync(runnable, executor));
   }
 
-  public void awaitFinish(long deadlineMs)
-      throws Exception {
+  public void awaitFinish(long deadlineMs) {
     CompletableFuture<Void> completableFuture = CompletableFuture.allOf(_futures.toArray(new CompletableFuture[]{}));
     try {
       completableFuture.get(deadlineMs - System.currentTimeMillis(), TimeUnit.MILLISECONDS);
+    } catch (Throwable t) {

Review Comment:
   Can this ever throw `Throwable`? Or is it always wrapped in `ExecutionException`?



-- 
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: commits-unsubscribe@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] Jackie-Jiang commented on a diff in pull request #11688: [multistage] improve dispatch exception handling

Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang commented on code in PR #11688:
URL: https://github.com/apache/pinot/pull/11688#discussion_r1337843734


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/service/SubmissionService.java:
##########
@@ -24,29 +24,30 @@
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
+import org.apache.pinot.common.exception.QueryException;
 
 
 /**
  * Submission service is used to submit multiple runnables and checks the result upon all {@link Future} returns
  * or any failure occurs.
  */
 public class SubmissionService {
-  private final ExecutorService _executor;
   private final List<CompletableFuture<Void>> _futures = new ArrayList<>();
 
-  public SubmissionService(ExecutorService executor) {
-    _executor = executor;
+  public SubmissionService() {

Review Comment:
   This is no longer a service. IMO it might be more readable if we directly implement this logic in `QueryServer.submit()`. I don't really see the value of this wrapper class



-- 
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: commits-unsubscribe@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] walterddr commented on a diff in pull request #11688: [multistage] improve dispatch exception handling

Posted by "walterddr (via GitHub)" <gi...@apache.org>.
walterddr commented on code in PR #11688:
URL: https://github.com/apache/pinot/pull/11688#discussion_r1337844975


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/service/SubmissionService.java:
##########
@@ -24,29 +24,30 @@
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
+import org.apache.pinot.common.exception.QueryException;
 
 
 /**
  * Submission service is used to submit multiple runnables and checks the result upon all {@link Future} returns
  * or any failure occurs.
  */
 public class SubmissionService {
-  private final ExecutorService _executor;
   private final List<CompletableFuture<Void>> _futures = new ArrayList<>();
 
-  public SubmissionService(ExecutorService executor) {
-    _executor = executor;
+  public SubmissionService() {

Review Comment:
   good point. will convert it into a util --> its only job is to maintain the list of futures for completion (wrapper class will make it easy to retest the logic IMO)



-- 
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: commits-unsubscribe@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] walterddr merged pull request #11688: [multistage] improve dispatch exception handling

Posted by "walterddr (via GitHub)" <gi...@apache.org>.
walterddr merged PR #11688:
URL: https://github.com/apache/pinot/pull/11688


-- 
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: commits-unsubscribe@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org