-
Notifications
You must be signed in to change notification settings - Fork 286
Description
Describe the bug
The opensearch source considers it has completely read an index when the search results is less than the page size.
Line 222 in 3cc41b7
| } while (searchWithSearchAfterResults.getDocuments().size() == searchConfiguration.getBatchSize()); |
This logic has a significant issue. If the search results failed to load a single document, the source will complete. This can happen early in an index, which leads to loading a small fraction of the documents. Or it can happen later.
Relatedly, I saw this happen when the search results included failures. These failures should be logged and counted in the metrics.
To Reproduce
None.
Expected behavior
I expect that the opensearch source should continue to read from the index as best as it can. If it fails to read some documents, it can log failure messages and report metrics.
We may also want to consider something in source coordination to indicate "completed with failures" that could be used to analyze failures.
Screenshots
N/A
Environment (please complete the following information):
Latest version of Data Prepper
Additional context
N/A
Metadata
Metadata
Assignees
Labels
Type
Projects
Status