[BUG] Empty DLQ entries when version conflicts occur
Describe the bug An empty DLQ object is created when there are failures shipping to OpenSearch but all of the failures are due to a version conflict. The code here filters out version conflicts from the DLQ entries: https://github.com/opensearch-project/data-prepper/blob/main/data-prepper-plugins/opensearch/src/main/java/org/opensearch/dataprepper/plugins/sink/opensearch/BulkRetryStrategy.java#L353-L356
But then there is no empty check before sending the doc list to the DLQ: https://github.com/opensearch-project/data-prepper/blob/main/data-prepper-plugins/opensearch/src/main/java/org/opensearch/dataprepper/plugins/sink/opensearch/BulkRetryStrategy.java#L369
To Reproduce Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
- OS: [e.g. Ubuntu 20.04 LTS]
- Version [e.g. 22]
Additional context Add any other context about the problem here.
Told by AWS Support that this issue is related to the issue that I opened here: https://github.com/opensearch-project/data-prepper/issues/4304