You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When an update is sent as a part of bulk, the request stays stuck in an infinite loop in TransportShardBulkAction due to repeated retries. This code pointer is expected to limit the number of retries to retry_on_conflict specified by the user in the bulk request, but the retryCounter in the BulkPrimaryExecutionContext is never incremented in the resetForExecutionForRetry method. In a scenario where there are repeated conflicts for an update, the loop in TransportShardBulkAction remains stuck forever. Note that this same behaviour is not seen when the _update API is invoked and a single document is updated because for the _update API, retries are handled in TransportUpdateAction.
Expected behavior
The expected behavior in this case would be for retry_on_conflict to be honored and for the request to be succeeded/failed gracefully.
Plugins
NA
Screenshots
NA
Host/Environment (please complete the following information):
NA
Additional context
NA
The text was updated successfully, but these errors were encountered:
raghuvanshraj
changed the title
[BUG] Update with retry_on_conflict stays stuck in an infinite loop when sent as a part of bulk
[BUG] Update with retry_on_conflict stays stuck in an infinite loop when sent as a part of bulk
Nov 10, 2023
raghuvanshraj
changed the title
[BUG] Update with retry_on_conflict stays stuck in an infinite loop when sent as a part of bulk
[BUG] Update with retry_on_conflict stays stuck in an infinite loop when sent as a part of bulk
Nov 10, 2023
Describe the bug
When an update is sent as a part of bulk, the request stays stuck in an infinite loop in
TransportShardBulkAction
due to repeated retries. This code pointer is expected to limit the number of retries toretry_on_conflict
specified by the user in the bulk request, but theretryCounter
in theBulkPrimaryExecutionContext
is never incremented in theresetForExecutionForRetry
method. In a scenario where there are repeated conflicts for an update, the loop inTransportShardBulkAction
remains stuck forever. Note that this same behaviour is not seen when the_update
API is invoked and a single document is updated because for the_update
API, retries are handled inTransportUpdateAction
.To Reproduce
We need to throw
VersionConflictEngineExceptions
repeatedly for this to show up. I have created a remote branch on my fork where I have modified the update code to always throwVersionConflictEngineExceptions
: https://github.com/raghuvanshraj/OpenSearch/tree/retry-on-conflict-testingSteps to reproduce the behavior:
bulk
API withretry_on_conflict
set in the update request. Sample:Expected behavior
The expected behavior in this case would be for
retry_on_conflict
to be honored and for the request to be succeeded/failed gracefully.Plugins
NA
Screenshots
NA
Host/Environment (please complete the following information):
NA
Additional context
NA
The text was updated successfully, but these errors were encountered: