Skip to content

Conversation

@dnhatn
Copy link
Member

@dnhatn dnhatn commented Feb 11, 2025

Currently, the ES|QL failure collectors categorize errors into non-cancellation and cancellation errors, preferring to return non-cancellation errors to users. With the retry on shard-level failure, the failure collector can now collect more categories of errors: client errors, server errors, shard-unavailable errors, and cancellation errors. For easier diagnostics and operations (especially on serverless), the failure collectors prefer returning client (4xx) errors over server (5xx) errors, shard-unavailable errors, and cancellation errors.

Relates #120774

@dnhatn dnhatn marked this pull request as ready for review February 12, 2025 06:44
@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Feb 12, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@dnhatn dnhatn requested a review from smalyshev February 12, 2025 23:54

private static final class CategorizedErrors {
final Queue<Exception> exceptions = ConcurrentCollections.newQueue();
final Semaphore permits;
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't ArrayBlockingQueue.offer() do the same thing?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, ArrayBlockingQueue should work too. I pushed ae8a308

@dnhatn dnhatn requested a review from smalyshev February 13, 2025 01:57
@dnhatn
Copy link
Member Author

dnhatn commented Feb 13, 2025

@smalyshev Thanks for reviewing.

@dnhatn dnhatn added backport pending auto-backport Automatically create backport pull requests when merged and removed backport pending labels Feb 13, 2025
@dnhatn dnhatn merged commit f789277 into elastic:main Feb 13, 2025
17 checks passed
@dnhatn dnhatn deleted the error-collector branch February 13, 2025 03:41
@elasticsearchmachine
Copy link
Collaborator

elasticsearchmachine commented Feb 13, 2025

8.x: #122463

dnhatn added a commit to dnhatn/elasticsearch that referenced this pull request Feb 13, 2025
Currently, the ES|QL failure collectors categorize errors into
non-cancellation and cancellation errors, preferring to return
non-cancellation errors to users. With the retry on shard-level failure,
the failure collector can now collect more categories of errors: client
errors, server errors, shard-unavailable errors, and cancellation
errors. For easier diagnostics and operations (especially on
serverless), the failure collectors prefer returning client (4xx) errors
over server (5xx) errors, shard-unavailable errors, and cancellation
errors.

Relates elastic#120774
elasticsearchmachine pushed a commit that referenced this pull request Feb 13, 2025
Currently, the ES|QL failure collectors categorize errors into
non-cancellation and cancellation errors, preferring to return
non-cancellation errors to users. With the retry on shard-level failure,
the failure collector can now collect more categories of errors: client
errors, server errors, shard-unavailable errors, and cancellation
errors. For easier diagnostics and operations (especially on
serverless), the failure collectors prefer returning client (4xx) errors
over server (5xx) errors, shard-unavailable errors, and cancellation
errors.

Relates #120774
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL auto-backport Automatically create backport pull requests when merged >non-issue Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants