mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-25 22:36:20 +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) {
|
public void onFailure(Throwable e) {
|
||||||
e = ExceptionsHelper.unwrapCause(e);
|
e = ExceptionsHelper.unwrapCause(e);
|
||||||
if (e instanceof VersionConflictEngineException) {
|
if (e instanceof VersionConflictEngineException) {
|
||||||
if ((retryCount + 1) < request.retryOnConflict()) {
|
if (retryCount < request.retryOnConflict()) {
|
||||||
threadPool.executor(executor()).execute(new Runnable() {
|
threadPool.executor(executor()).execute(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@ -231,7 +231,7 @@ public class TransportUpdateAction extends TransportInstanceSingleOperationActio
|
|||||||
public void onFailure(Throwable e) {
|
public void onFailure(Throwable e) {
|
||||||
e = ExceptionsHelper.unwrapCause(e);
|
e = ExceptionsHelper.unwrapCause(e);
|
||||||
if (e instanceof VersionConflictEngineException) {
|
if (e instanceof VersionConflictEngineException) {
|
||||||
if ((retryCount + 1) < request.retryOnConflict()) {
|
if (retryCount < request.retryOnConflict()) {
|
||||||
threadPool.executor(executor()).execute(new Runnable() {
|
threadPool.executor(executor()).execute(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
@ -49,7 +49,7 @@ public class UpdateRequest extends InstanceShardOperationRequest {
|
|||||||
@Nullable
|
@Nullable
|
||||||
Map<String, Object> scriptParams;
|
Map<String, Object> scriptParams;
|
||||||
|
|
||||||
int retryOnConflict = 1;
|
int retryOnConflict = 0;
|
||||||
|
|
||||||
private ReplicationType replicationType = ReplicationType.DEFAULT;
|
private ReplicationType replicationType = ReplicationType.DEFAULT;
|
||||||
private WriteConsistencyLevel consistencyLevel = WriteConsistencyLevel.DEFAULT;
|
private WriteConsistencyLevel consistencyLevel = WriteConsistencyLevel.DEFAULT;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user