Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abandon aggregation jobs early when a fatal error is encountered #2502

Merged
merged 3 commits into from
Jan 22, 2024

Conversation

inahga
Copy link
Contributor

@inahga inahga commented Jan 16, 2024

Closes #235. Similar to #2476.

I've duplicated the is_retryable_error() function because I strongly suspect that the interesting errors are going to differ between the two jobs.

I've removed usage of anyhow::Error from the aggregation job driver. While we can downcast() an anyhow::Error, it seemed cleaner just to go ahead and use our fully fleshed out aggregator::Error instead.

@inahga inahga requested a review from a team as a code owner January 16, 2024 20:10
Comment on lines 900 to +903
self: Arc<Self>,
datastore: Arc<Datastore<C>>,
maximum_attempts_before_failure: usize,
) -> impl Fn(Lease<AcquiredAggregationJob>) -> BoxFuture<'static, Result<(), anyhow::Error>>
{
) -> impl Fn(Lease<AcquiredAggregationJob>) -> BoxFuture<'static, Result<(), Error>> {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is basically the same as its collector counterpart, which makes it a candidate for hoisting out into the JobDriver, however I think it's just under the threshold where that refactor would be worth it, in terms of how much code needs to be touched.

@inahga inahga force-pushed the inahga/abandon-aggregation-job-early branch from 5c7d014 to 11ed62f Compare January 17, 2024 16:15
@inahga inahga force-pushed the inahga/abandon-aggregation-job-early branch from 11ed62f to d2b6498 Compare January 18, 2024 16:04
@inahga inahga merged commit 058b0c1 into main Jan 22, 2024
7 checks passed
@inahga inahga deleted the inahga/abandon-aggregation-job-early branch January 22, 2024 18:33
inahga added a commit that referenced this pull request Jan 22, 2024
* Abandon aggregation jobs early when a fatal error is encountered

* Update aggregator/src/aggregator/aggregation_job_driver.rs

Co-authored-by: Brandon Pitman <[email protected]>

* Rebase pain

---------

Co-authored-by: Brandon Pitman <[email protected]>
inahga added a commit that referenced this pull request Jan 23, 2024
* Abandon aggregation jobs early when a fatal error is encountered

* Update aggregator/src/aggregator/aggregation_job_driver.rs

Co-authored-by: Brandon Pitman <[email protected]>

* Rebase pain

---------

Co-authored-by: Brandon Pitman <[email protected]>
inahga added a commit that referenced this pull request Jan 23, 2024
…ease/0.6 backport #2502) (#2517)

* Abandon aggregation jobs early when a fatal error is encountered (#2502)

* Abandon aggregation jobs early when a fatal error is encountered

* Update aggregator/src/aggregator/aggregation_job_driver.rs

Co-authored-by: Brandon Pitman <[email protected]>

* Rebase pain

---------

Co-authored-by: Brandon Pitman <[email protected]>

* Fix for 0.6

---------

Co-authored-by: Brandon Pitman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider aborting aggregation jobs entirely on certain errors from helper
2 participants