index.startTime(), indexResult.getFailure().toString()); location = innerNoOp(noOp).getTranslogLocation(); } else {
@Override public void postIndex(ShardId shardId, Engine.Index index, Engine.IndexResult result) { switch (result.getResultType()) { case SUCCESS: if (index.origin().isRecovery() == false) { long took = result.getTook(); totalStats.indexMetric.inc(took); totalStats.indexCurrent.dec(); StatsHolder typeStats = typeStats(index.type()); typeStats.indexMetric.inc(took); typeStats.indexCurrent.dec(); } break; case FAILURE: postIndex(shardId, index, result.getFailure()); break; default: throw new IllegalArgumentException("unknown result type: " + result.getResultType()); } }
index.startTime(), indexResult.getFailure().toString()); location = innerNoOp(noOp).getTranslogLocation(); } else {
@Override public void postIndex(ShardId shardId, Engine.Index index, Engine.IndexResult result) { switch (result.getResultType()) { case SUCCESS: if (index.origin().isRecovery() == false) { long took = result.getTook(); totalStats.indexMetric.inc(took); totalStats.indexCurrent.dec(); StatsHolder typeStats = typeStats(index.type()); typeStats.indexMetric.inc(took); typeStats.indexCurrent.dec(); } break; case FAILURE: postIndex(shardId, index, result.getFailure()); break; default: throw new IllegalArgumentException("unknown result type: " + result.getResultType()); } }
@Override public void postIndex(ShardId shardId, Engine.Index index, Engine.IndexResult result) { switch (result.getResultType()) { case SUCCESS: if (index.origin().isRecovery() == false) { long took = result.getTook(); totalStats.indexMetric.inc(took); totalStats.indexCurrent.dec(); StatsHolder typeStats = typeStats(index.type()); typeStats.indexMetric.inc(took); typeStats.indexCurrent.dec(); } break; case FAILURE: postIndex(shardId, index, result.getFailure()); break; default: throw new IllegalArgumentException("unknown result type: " + result.getResultType()); } }
@Override public void postIndex(ShardId shardId, Engine.Index index, Engine.IndexResult result) { if (result.hasFailure() == false) { if (!index.origin().isRecovery()) { long took = result.getTook(); totalStats.indexMetric.inc(took); totalStats.indexCurrent.dec(); StatsHolder typeStats = typeStats(index.type()); typeStats.indexMetric.inc(took); typeStats.indexCurrent.dec(); } } else { postIndex(shardId, index, result.getFailure()); } }