The PR https://github.com/opensearch-project/opensearch-spark/issues/361 addressed the Flint index state update when a streaming job terminates with an exception. However, an edge case was found where the streaming job exits earlier than the new awaitMonitor call in the FlintJob. In such cases, the index state transition logic in the awaitMonitor API is not executed.
How can one reproduce the bug?
Steps to reproduce the behavior in IT:
Create a Flint index with auto refresh enabled
Stop the streaming job behind it by Spark API
Call the awaitMonitor API
Check that the index state remains REFRESHING
What is the expected behavior?
Ensure that the Flint index state is updated to FAILED even if the streaming job exits early and the awaitMonitor API is called subsequently.
What is the bug?
The PR https://github.com/opensearch-project/opensearch-spark/issues/361 addressed the Flint index state update when a streaming job terminates with an exception. However, an edge case was found where the streaming job exits earlier than the new
awaitMonitor
call in theFlintJob
. In such cases, the index state transition logic in theawaitMonitor
API is not executed.How can one reproduce the bug? Steps to reproduce the behavior in IT:
awaitMonitor
APIREFRESHING
What is the expected behavior?
Ensure that the Flint index state is updated to
FAILED
even if the streaming job exits early and theawaitMonitor
API is called subsequently.Do you have any screenshots?
N/A
Do you have any additional context?
N/A