Skip to content

Commit 1712272

Browse files
committed
Add restore context
Signed-off-by: Craig Perkins <cwperx@amazon.com>
1 parent fbad6a4 commit 1712272

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

plugin/src/main/java/org/opensearch/ml/model/MLModelManager.java

+1
Original file line numberDiff line numberDiff line change
@@ -2080,6 +2080,7 @@ public void getConnector(String connectorId, String tenantId, ActionListener<Con
20802080
try (ThreadContext.StoredContext ctx = client.threadPool().getThreadContext().stashContext()) {
20812081
sdkClient.getDataObjectAsync(getDataObjectRequest).whenComplete((r, throwable) -> {
20822082
log.debug("Completed Get Connector Request, id:{}", connectorId);
2083+
ctx.restore();
20832084
if (throwable != null) {
20842085
Exception cause = SdkClientUtils.unwrapAndConvertToException(throwable);
20852086
if (ExceptionsHelper.unwrap(cause, IndexNotFoundException.class) != null) {

0 commit comments

Comments
 (0)