-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Make Transport Shard Bulk Action Async #39793
Merged
original-brownbear
merged 26 commits into
elastic:master
from
original-brownbear:async-bulk-action
Apr 6, 2019
Merged
Changes from 23 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
5ee4211
Make TransportBulkAction Non-Blocking
original-brownbear 788efd3
Merge remote-tracking branch 'elastic/master' into async-bulk-action
original-brownbear 36508a6
Merge remote-tracking branch 'elastic/master' into async-bulk-action
original-brownbear 40a3c8d
Merge remote-tracking branch 'elastic/master' into async-bulk-action
original-brownbear 764b70b
shorter diff
original-brownbear 6a59fa0
shorter
original-brownbear 0bb09ee
shorter
original-brownbear 9a22a36
fix duplication
original-brownbear 8df5f96
fix test
original-brownbear b47e5f7
Merge remote-tracking branch 'elastic/master' into async-bulk-action
original-brownbear f3b59c2
CR: handle bulk rejections after mapping updates
original-brownbear 0b3b4ab
Merge remote-tracking branch 'elastic/master' into async-bulk-action
original-brownbear a3c8cac
CR: add test for bulk rejection behaviour
original-brownbear 7f8700a
Merge remote-tracking branch 'elastic/master' into async-bulk-action
original-brownbear 5780183
Merge remote-tracking branch 'elastic/master' into async-bulk-action
original-brownbear e59c5ea
Merge remote-tracking branch 'elastic/master' into async-bulk-action
original-brownbear c319bef
CR: comments
original-brownbear c5edc6e
dry up exception handling
original-brownbear e13ac0a
Merge remote-tracking branch 'elastic/master' into async-bulk-action
original-brownbear 7d6fd4a
CR comments
original-brownbear 9e84385
revert needless change
original-brownbear 2277d40
Merge remote-tracking branch 'elastic/master' into async-bulk-action
original-brownbear 3001b27
Merge remote-tracking branch 'elastic/master' into async-bulk-action
original-brownbear 3475e04
Merge remote-tracking branch 'elastic/master' into async-bulk-action
original-brownbear b0b844f
CR: Revert changes to shardOperationOnPrimary interface
original-brownbear 79944b6
Revert "CR: Revert changes to shardOperationOnPrimary interface"
original-brownbear File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
311 changes: 161 additions & 150 deletions
311
server/src/main/java/org/elasticsearch/action/bulk/TransportShardBulkAction.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since most of write actions execute its primary action synchronously, maybe introduce an async method which uses the result from the sync version by default (see https://github.com/elastic/elasticsearch/blob/master/server/src/main/java/org/elasticsearch/action/support/single/shard/TransportSingleShardAction.java#L106-L120). We then can revert changes in other actions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried doing this here, but ran into a bit of a mess with the slightly strange way we handle the overrides of this method where we constrain the type to
WritePrimaryResult
so I decided to not do it here to unblock another thing.I like the idea though! => I'll open a PR that cleans this up (very) shortly :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worry. It's optional. Thanks for giving it a try.