You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2021/04/09 22:11:21 UTC
[GitHub] [druid] capistrant opened a new pull request #11090: Add handoff wait time to IngestionStatsAndErrorsTaskReportData
capistrant opened a new pull request #11090:
URL: https://github.com/apache/druid/pull/11090
<!-- Thanks for trying to help us make Apache Druid be the best it can be! Please fill out as much of the following information as is possible (where relevant, and remove it when irrelevant) to help make the intention and scope of this PR clear in order to ease review. -->
<!-- Please read the doc for contribution (https://github.com/apache/druid/blob/master/CONTRIBUTING.md) before making this PR. Also, once you open a PR, please _avoid using force pushes and rebasing_ since these make it difficult for reviewers to see what you've changed in response to their reviews. See [the 'If your pull request shows conflicts with master' section](https://github.com/apache/druid/blob/master/CONTRIBUTING.md#if-your-pull-request-shows-conflicts-with-master) for more details. -->
<!-- Replace XXXX with the id of the issue fixed in this PR. Remove this section if there is no corresponding issue. Don't reference the issue in the title of this pull-request. -->
<!-- If you are a committer, follow the PR action item checklist for committers:
https://github.com/apache/druid/blob/master/dev/committer-instructions.md#pr-and-issue-action-item-checklist-for-committers. -->
### Description
<!-- Describe the goal of this PR, what problem are you fixing. If there is a corresponding issue (referenced above), it's not necessary to repeat the description here, however, you may choose to keep one summary sentence. -->
<!-- Describe your patch: what did you change in code? How did you fix the problem? -->
<!-- If there are several relatively logically separate changes in this PR, create a mini-section for each of them. For example: -->
Follow on to #10676.
The main change is adding `segmentAvailabilityWaitTimeMs` to `IngestionStatsAndErrorsTaskReportData`. This is the milliseconds that a task waited for its segments to be handed off to Historical nodes. If there is no wait for handoff, the value is simply 0. Otherwise the handoff value can be between 0 and the configured timeout.
Secondly, I made a small refactor of `AbstractBatchIndexTask#waitForSegmentAvailability`. The method now sets the value for `segmentAvailabilityConfirmationCompleted` as well as returns the boolean value assigned to that variable. In the past the code only returned the boolean and relied on the caller to set the value, this seemed like poor practice.
<!--
In each section, please describe design decisions made, including:
- Choice of algorithms
- Behavioral aspects. What configuration values are acceptable? How are corner cases and error conditions handled, such as when there are insufficient resources?
- Class organization and design (how the logic is split between classes, inheritance, composition, design patterns)
- Method organization and design (how the logic is split between methods, parameters and return types)
- Naming (class, method, API, configuration, HTTP endpoint, names of emitted metrics)
-->
<!-- It's good to describe an alternative design (or mention an alternative name) for every design (or naming) decision point and compare the alternatives with the designs that you've implemented (or the names you've chosen) to highlight the advantages of the chosen designs and names. -->
<!-- If there was a discussion of the design of the feature implemented in this PR elsewhere (e. g. a "Proposal" issue, any other issue, or a thread in the development mailing list), link to that discussion from this PR description and explain what have changed in your final design compared to your original proposal or the consensus version in the end of the discussion. If something hasn't changed since the original discussion, you can omit a detailed discussion of those aspects of the design here, perhaps apart from brief mentioning for the sake of readability of this PR description. -->
<!-- Some of the aspects mentioned above may be omitted for simple and small changes. -->
<hr>
##### Key changed/added classes in this PR
* `IngestionStatsAndErrorsTaskReportData`
* `AbstractBatchIndexTask`
<hr>
<!-- Check the items by putting "x" in the brackets for the done things. Not all of these items apply to every PR. Remove the items which are not done or not relevant to the PR. None of the items from the checklist below are strictly necessary, but it would be very helpful if you at least self-review the PR. -->
This PR has:
- [ ] been self-reviewed.
- [ ] added documentation for new or modified features or behaviors.
- [ ] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
- [ ] added or updated version, license, or notice information in [licenses.yaml](https://github.com/apache/druid/blob/master/dev/license.md)
- [ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
- [ ] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for [code coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md) is met.
- [ ] been tested in a test Druid cluster.
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] maytasm commented on pull request #11090: Add handoff wait time to IngestionStatsAndErrorsTaskReportData
Posted by GitBox <gi...@apache.org>.
maytasm commented on pull request #11090:
URL: https://github.com/apache/druid/pull/11090#issuecomment-923722258
This change is causing build to fail. Seems like this change https://github.com/apache/druid/pull/11688 that went in a few days ago use the IngestionStatsAndErrorsTaskReportData constructor which is now changed in this PR. Travis green check in this PR was from 25 days ago. In the future, I recommend rerunning Travis before merging for checks that passed long time ago.
--
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@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] jihoonson commented on pull request #11090: Add handoff wait time to IngestionStatsAndErrorsTaskReportData
Posted by GitBox <gi...@apache.org>.
jihoonson commented on pull request #11090:
URL: https://github.com/apache/druid/pull/11090#issuecomment-923648815
LGTM, Thanks @capistrant. I don't particularly worry about it but we can include some warning about it in the release notes if you want.
--
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@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] jihoonson commented on pull request #11090: Add handoff wait time to IngestionStatsAndErrorsTaskReportData
Posted by GitBox <gi...@apache.org>.
jihoonson commented on pull request #11090:
URL: https://github.com/apache/druid/pull/11090#issuecomment-873346281
Thank you for the follow-up! Code changes LGTM, but can you please add some integration tests? I guess you can modify those integration tests you added in the previous PR to verify that the waitTime is always larger than 0.
--
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@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] capistrant commented on pull request #11090: Add handoff wait time to IngestionStatsAndErrorsTaskReportData
Posted by GitBox <gi...@apache.org>.
capistrant commented on pull request #11090:
URL: https://github.com/apache/druid/pull/11090#issuecomment-914531552
@jihoonson should we have to do anything more than adding this to release notes in future release to notify clients of json payload change? I suppose it is possible that clients are relying on some static schema for this report JSON so the new field could break code that doesn't ignore new fields being added.
--
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@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] capistrant commented on pull request #11090: Add handoff wait time to IngestionStatsAndErrorsTaskReportData
Posted by GitBox <gi...@apache.org>.
capistrant commented on pull request #11090:
URL: https://github.com/apache/druid/pull/11090#issuecomment-907376775
> LGTM! Do we need any accompanying docs for this change?
>
> Nice addition to get the IT for free :)
good point. just added to the tasks.md docs to help inform users
--
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@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] capistrant commented on pull request #11090: Add handoff wait time to IngestionStatsAndErrorsTaskReportData
Posted by GitBox <gi...@apache.org>.
capistrant commented on pull request #11090:
URL: https://github.com/apache/druid/pull/11090#issuecomment-931648324
> This change is causing build to fail. Seems like the change #11688 that went in a few days ago use the IngestionStatsAndErrorsTaskReportData constructor which is now changed in this PR. Travis green check in this PR was from 25 days ago. In the future, I recommend rerunning Travis before merging for checks that passed long time ago.
agree 100%. I've been trying to stay on top of merging with master on a regular basis to make sure I keep CI fresh but let this one slip. Thanks for the quick fix for master
--
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@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] capistrant commented on pull request #11090: Add handoff wait time to IngestionStatsAndErrorsTaskReportData
Posted by GitBox <gi...@apache.org>.
capistrant commented on pull request #11090:
URL: https://github.com/apache/druid/pull/11090#issuecomment-873156330
@jihoonson you mentioned that it would be nice to have this added to the report in #10676 ([discussion](https://github.com/apache/druid/pull/10676#discussion_r566380095)) If you get a chance, could you take a peek at this in the next few weeks? would be great to get it into the code before 0.22.0 release cycle starts so it goes in as the same time as the pr to add the handoff wait. Thanks!
--
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@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] maytasm edited a comment on pull request #11090: Add handoff wait time to IngestionStatsAndErrorsTaskReportData
Posted by GitBox <gi...@apache.org>.
maytasm edited a comment on pull request #11090:
URL: https://github.com/apache/druid/pull/11090#issuecomment-923722258
This change is causing build to fail. Seems like the change https://github.com/apache/druid/pull/11688 that went in a few days ago use the IngestionStatsAndErrorsTaskReportData constructor which is now changed in this PR. Travis green check in this PR was from 25 days ago. In the future, I recommend rerunning Travis before merging for checks that passed long time ago.
--
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@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] capistrant commented on a change in pull request #11090: Add handoff wait time to IngestionStatsAndErrorsTaskReportData
Posted by GitBox <gi...@apache.org>.
capistrant commented on a change in pull request #11090:
URL: https://github.com/apache/druid/pull/11090#discussion_r697625087
##########
File path: docs/ingestion/native-batch.md
##########
@@ -198,7 +198,6 @@ A sample task is shown below:
|id|The task ID. If this is not explicitly specified, Druid generates the task ID using task type, data source name, interval, and date-time stamp. |no|
|spec|The ingestion spec including the data schema, IOConfig, and TuningConfig. See below for more details. |yes|
|context|Context containing various task configuration parameters. See below for more details.|no|
-|awaitSegmentAvailabilityTimeoutMillis|Long|Milliseconds to wait for the newly indexed segments to become available for query after ingestion completes. If `<= 0`, no wait will occur. If `> 0`, the task will wait for the Coordinator to indicate that the new segments are available for querying. If the timeout expires, the task will exit as successful, but the segments were not confirmed to have become available for query. Note for compaction tasks: you should not set this to a non-zero value because it is not supported by the compaction task type at this time.|no (default = 0)|
Review comment:
Realized that this doc was misplaced and duplicated in the native-batch file. It is found below in the tuningConfig section where it should be. This is just clean up.
--
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@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] jihoonson merged pull request #11090: Add handoff wait time to IngestionStatsAndErrorsTaskReportData
Posted by GitBox <gi...@apache.org>.
jihoonson merged pull request #11090:
URL: https://github.com/apache/druid/pull/11090
--
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@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] capistrant commented on pull request #11090: Add handoff wait time to IngestionStatsAndErrorsTaskReportData
Posted by GitBox <gi...@apache.org>.
capistrant commented on pull request #11090:
URL: https://github.com/apache/druid/pull/11090#issuecomment-876740452
> Thank you for the follow-up! Code changes LGTM, but can you please add some integration tests? I guess you can modify those integration tests you added in the previous PR to verify that the waitTime is always larger than 0.
good point. I went with a simple assertion in the existing code to verify the report has a non-zero wait time for the IT that perform a handoff wait. I believe that should suffice in making sure the report stays valid
--
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@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org