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

Fix Exception Handling for TransportShardBulkAction #41006

Conversation

original-brownbear
Copy link
Member

  • Prior to Make Transport Shard Bulk Action Async #39793 exceptions for the primary write and delete actions
    were bubbled up to the caller so that closed shards would be handled accordingly upstream.
    Make Transport Shard Bulk Action Async #39793 accidentally changed the behavior here and simply marked those exceptions as bulk item failures on the request and kept processing bulk request items on closed shards.
  • This fix returns to that behavior and adjusts the listeners passed in TransportReplicationAction
    such that they behave like the previous synchronous catch.
    • Dried up the exception handling slightly for that and inlined all the listeners to make the logic a little
      easier to follow
  • Reenable SplitIndexIT now that closed shards are properly handled again
  • Closes SplitIndexIT fails with AlreadyClosedException #40944

marked non-issue since this bug didn't go into any release yet

* Prior to elastic#39793 exceptions for the primary write and delete actions
were bubbled up to the caller so that closed shards would be handled accordingly upstream.
 elastic#39793 accidentally changed the behaviour here and simply marked those exceptions as bulk item failures on the request and kept processing bulk request items on closed shards.
* This fix returns to that behaviour and adjusts the listeners passed in `TransportReplicationAction`
such that they behave like the previous synchronous `catch`.
   * Dried up the exception handling slightly for that and inlined all the listeners to make the logic a little
easier to follow
* Reenable SplitIndexIT now that clsoed shards are properly handled again
* Closes elastic#40944
@original-brownbear original-brownbear added >non-issue :Distributed/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. v8.0.0 v7.2.0 labels Apr 9, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

Copy link
Member

@dnhatn dnhatn left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @original-brownbear.

I hope we can keep "All exceptions should be handled by #executeBulkItemRequest" but I could not find a good way to achieve it.

@original-brownbear
Copy link
Member Author

thanks @dnhatn !

"All exceptions should be handled by #executeBulkItemRequest"

+1, let's see what the future brings :)

@original-brownbear original-brownbear merged commit 1830a49 into elastic:master Apr 9, 2019
@original-brownbear original-brownbear deleted the fix-bulk-req-err-handling branch April 9, 2019 17:46
dnhatn added a commit that referenced this pull request Apr 10, 2019
gurkankaymak pushed a commit to gurkankaymak/elasticsearch that referenced this pull request May 27, 2019
* Prior to elastic#39793 exceptions for the primary write and delete actions
were bubbled up to the caller so that closed shards would be handled accordingly upstream.
 elastic#39793 accidentally changed the behaviour here and simply marked those exceptions as bulk item failures on the request and kept processing bulk request items on closed shards.
* This fix returns to that behaviour and adjusts the listeners passed in `TransportReplicationAction`
such that they behave like the previous synchronous `catch`.
   * Dried up the exception handling slightly for that and inlined all the listeners to make the logic a little
easier to follow
* Reenable SplitIndexIT now that clsoed shards are properly handled again
* Closes elastic#40944
gurkankaymak pushed a commit to gurkankaymak/elasticsearch that referenced this pull request May 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. >non-issue v7.2.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SplitIndexIT fails with AlreadyClosedException
4 participants