have retry on conflict parameter default to 0, and really mean it when retrying...

This commit is contained in:
Shay Banon 2012-01-05 23:45:00 +02:00
parent 13ad6015c4
commit 93cce59a74
2 changed files with 3 additions and 3 deletions

View File

@ -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() {

View File

@ -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;