Relax Overly Strict Assertion in TransportShardBulkAction#40940
Relax Overly Strict Assertion in TransportShardBulkAction#40940original-brownbear merged 3 commits intoelastic:masterfrom original-brownbear:40933
Conversation
* In #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 #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 |
DaveCTurner
left a comment
There was a problem hiding this comment.
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 :) |
dnhatn
left a comment
There was a problem hiding this comment.
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.IndexShardClosedExceptioncan 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 infinishRequestafter all the bulk items have been handled will fail the listener but not trip the assertion.This exception trips the assertion: