mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-25 14:26:27 +00:00
have retry on conflict parameter default to 0, and really mean it when retrying...
This commit is contained in:
parent
13ad6015c4
commit
93cce59a74
@ -204,7 +204,7 @@ public class TransportUpdateAction extends TransportInstanceSingleOperationActio
|
||||
public void onFailure(Throwable e) {
|
||||
e = ExceptionsHelper.unwrapCause(e);
|
||||
if (e instanceof VersionConflictEngineException) {
|
||||
if ((retryCount + 1) < request.retryOnConflict()) {
|
||||
if (retryCount < request.retryOnConflict()) {
|
||||
threadPool.executor(executor()).execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -231,7 +231,7 @@ public class TransportUpdateAction extends TransportInstanceSingleOperationActio
|
||||
public void onFailure(Throwable e) {
|
||||
e = ExceptionsHelper.unwrapCause(e);
|
||||
if (e instanceof VersionConflictEngineException) {
|
||||
if ((retryCount + 1) < request.retryOnConflict()) {
|
||||
if (retryCount < request.retryOnConflict()) {
|
||||
threadPool.executor(executor()).execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
@ -49,7 +49,7 @@ public class UpdateRequest extends InstanceShardOperationRequest {
|
||||
@Nullable
|
||||
Map<String, Object> scriptParams;
|
||||
|
||||
int retryOnConflict = 1;
|
||||
int retryOnConflict = 0;
|
||||
|
||||
private ReplicationType replicationType = ReplicationType.DEFAULT;
|
||||
private WriteConsistencyLevel consistencyLevel = WriteConsistencyLevel.DEFAULT;
|
||||
|
Loading…
x
Reference in New Issue
Block a user