Skip to content

Commit

Permalink
introduce a new exception for segment upload failures and handle inte…
Browse files Browse the repository at this point in the history
…rrupted latch.await

Signed-off-by: Varun Bansal <[email protected]>
  • Loading branch information
linuxpi committed May 20, 2024
1 parent 85416eb commit d15ded5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ public void onFailure(Exception e) {
remoteStoreSettings.getClusterRemoteSegmentTransferTimeout().millis(),
TimeUnit.MILLISECONDS
) == false) {
throw new InterruptedException("Timeout while waiting for remote segment transfer to complete");
throw new SegmentUploadFailedException("Timeout while waiting for remote segment transfer to complete");
}
} catch (EngineException e) {
logger.warn("Exception while reading SegmentInfosSnapshot", e);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/

package org.opensearch.index.shard;

import java.io.IOException;

public class SegmentUploadFailedException extends IOException {

public SegmentUploadFailedException(String message) {
super(message);
}
}

0 comments on commit d15ded5

Please sign in to comment.