-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Relax Overly Strict Assertion in TransportShardBulkAction #40940
Conversation
* In elastic#39793 this assertion was added under the assumption that no exceptions would be thrown in this method, which turned out not to be correct and at the very least `org.elasticsearch.index.shard.IndexShardClosedException` can be thrown by `org.elasticsearch.index.shard.IndexShard.sync` * Closes elastic#40933
Pinging @elastic/es-distributed |
Another example of why this assertion wasn't a good idea https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+pull-request-1/11667/ :) |
@dnhatn this fix seems to empirically fix this just fine for me, but I'm a little worried about the exception that's causing this in the first place:
could it be some mistake snuck into #39793 that allows for the shard to be closed in the middle of the bulk operation here? |
Jenkins run elasticsearch-ci/2 |
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.
Ok, LGTM, this will help with ongoing test failures. I would still like @dnhatn to look at this too as the failure handling in this area is subtle.
@DaveCTurner thanks merging now to fix tests then, but yea @dnhatn please take a look when you can :) |
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.
LGTM. Thanks @original-brownbear.
…e-unsafe-publication * elastic/master: Update contributing docs to reflect JDK 11 (elastic#40955) Docs: Simplifying setup by using module configuration variant syntax (elastic#40879) Unmute CreateIndexIT testCreateAndDeleteIndexConcurrently CI failures (elastic#40960) Revert "Short-circuit rebalancing when disabled (elastic#40942)" Mute EnableAllocationShortCircuitTests SQL: Refactor args verification of In & conditionals (elastic#40916) Avoid sharing source directories as it breaks intellij (elastic#40877) Short-circuit rebalancing when disabled (elastic#40942) SQL: Prefer resultSets over exceptions in metadata (elastic#40641) Mute ClusterPrivilegeTests.testThatSnapshotAndRestore Fix Race in AsyncTwoPhaseIndexerTests.testStateMachine (elastic#40947) Relax Overly Strict Assertion in TransportShardBulkAction (elastic#40940)
) * Remove Overly Strict Assertion in TransportShardBulkAction * In elastic#39793 this assertion was added under the assumption that no exceptions would be thrown in this method, which turned out not to be correct and at the very least `org.elasticsearch.index.shard.IndexShardClosedException` can be thrown by `org.elasticsearch.index.shard.IndexShard.sync` * Closes elastic#40933
org.elasticsearch.index.shard.IndexShardClosedException
can be thrown byorg.elasticsearch.index.shard.IndexShard.sync
(see Make Transport Shard Bulk Action Async #39793 (comment) for the exact spot this snuck in) so I relaxed the situation now in so far that a failure infinishRequest
after all the bulk items have been handled will fail the listener but not trip the assertion.This exception trips the assertion: