Skip to content

Commit

Permalink
correcting OpenSearchRejectedExecutionException import
Browse files Browse the repository at this point in the history
Signed-off-by: sricharanvuppu <[email protected]>
  • Loading branch information
sricharanvuppu committed Jun 28, 2023
1 parent f0b9fea commit b086a7e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,6 @@ class TranslogSequencer(scope: CoroutineScope, private val replicationMetadata:
} finally {
rateLimiter.release()
}
<<<<<<< HEAD

val tookInNanos = System.nanoTime() - relativeStartNanos
followerClusterStats.stats[followerShardId]!!.totalWriteTime.addAndGet(TimeUnit.NANOSECONDS.toMillis(tookInNanos))
followerClusterStats.stats[followerShardId]!!.opsWritten.addAndGet(replayRequest.changes.size.toLong())
=======
>>>>>>> 448e7a7 (Handling OpenSearchRejectExecuteException Exception (#1004))
}
highWatermark = next.changes.lastOrNull()?.seqNo() ?: highWatermark
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/org/opensearch/replication/util/Extensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,13 @@ suspend fun <Req: ActionRequest, Resp: ActionResponse> Client.suspendExecuteWith
// This waits for the dependencies to load and retry. Helps during boot-up
|| e.status().status >= 500
|| e.status() == RestStatus.TOO_MANY_REQUESTS)) {
retryException = e;
retryException = e
} else {
throw e
}
} catch (e: OpenSearchRejectedExecutionException) {
if(index < numberOfRetries-2) {
retryException = e;
retryException = e
}
else {
throw ReplicationException(e, RestStatus.TOO_MANY_REQUESTS)
Expand Down

0 comments on commit b086a7e

Please sign in to comment.