-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle case when leader index mapping is not available
In case of large documents, leader mapping is not immediately available which causes an NPE and fails the shard task. Checking whether mapping is available and throwing exception if it not available so that the call can be retried. Signed-off-by: Sooraj Sinha <[email protected]>
- Loading branch information
Showing
3 changed files
with
40 additions
and
2 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
src/main/kotlin/org/opensearch/replication/MappingNotAvailableException.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* 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. | ||
* | ||
* Modifications Copyright OpenSearch Contributors. See | ||
* GitHub history for details. | ||
*/ | ||
|
||
package org.opensearch.replication; | ||
|
||
import org.opensearch.OpenSearchException | ||
|
||
public class MappingNotAvailableException: OpenSearchException { | ||
|
||
constructor(message: String, vararg args: Any) : super(message, *args) | ||
|
||
constructor(message: String, cause: Throwable, vararg args: Any) : super(message, cause, *args) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters