Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors are silent in delete by query in ReactiveElasticsearchTemplate #1679

Closed
efreeti opened this issue Feb 1, 2021 · 1 comment · Fixed by #1692
Closed

Errors are silent in delete by query in ReactiveElasticsearchTemplate #1679

efreeti opened this issue Feb 1, 2021 · 1 comment · Fixed by #1692
Assignees
Labels
type: enhancement A general enhancement

Comments

@efreeti
Copy link

efreeti commented Feb 1, 2021

One the level of ReactiveElasticsearchClient the deleteBy method returns BulkByScrollResponse which in itself contains a list of failures during the search or delete phase. On the level of ReactiveElasticsearchTemplate though those failures are ignored and only totals are extracted - https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchTemplate.java#L535

This makes it impossible to catch failures during the delete phase on the level of ReactiveElasticsearchOperations unless you extend that class and override that behaviour. The affected count on it's own is not enough to make conclusions if there are errors so it's pretty leaky abstraction. I combination with multiGet giving no possibility to detect errors it makes automation of bulk updates/removals quite unstable.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 1, 2021
@sothawo
Copy link
Collaborator

sothawo commented Feb 1, 2021

Seems to make more sense to return the information from the BulkByScrollResponse in a new return type instead of a Mono<Long>.

@sothawo sothawo added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Feb 1, 2021
@sothawo sothawo self-assigned this Feb 13, 2021
sothawo added a commit that referenced this issue Feb 13, 2021
@sothawo sothawo added this to the 4.2 M3 (2021.0.0) milestone Feb 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants