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

Issue with Removing Document from Search Index When Deleting User #16493

Closed
sonika-shah opened this issue May 31, 2024 · 0 comments · Fixed by #16492
Closed

Issue with Removing Document from Search Index When Deleting User #16493

sonika-shah opened this issue May 31, 2024 · 0 comments · Fixed by #16492
Assignees

Comments

@sonika-shah
Copy link
Contributor

sonika-shah commented May 31, 2024

Affected module
backend

Describe the bug
When attempting to delete a user, we encounter an error where the corresponding document fails to be removed from the search index.

ERROR [2024-05-30 07:02:30,186] [dw-204 - DELETE /api/v1/users/1bedc6cd-4ce9-4eae-bf4e-e034dfda7f1b?hardDelete=true&recursive=false] 
o.o.s.s.SearchRepository - Issue in Deleting the search document for entityID [1bedc6cd-4ce9-4eae-bf4e-e034dfda7f1b] and entityType [user]. 
Reason[Validation Failed: 1: use _all if you really want to delete from all existing indexes;], Cause[null], Stack [os.org.opensearch.action.ActionRequestValidationException: Validation Failed: 1: use _all if you really want to delete from all existing indexes;
	at os.org.opensearch.action.ValidateActions.addValidationError(ValidateActions.java:44)
	at os.org.opensearch.index.reindex.DeleteByQueryRequest.validate(DeleteByQueryRequest.java:156)
	at os.org.opensearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1873)
	at os.org.opensearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1845)
	at os.org.opensearch.client.RestHighLevelClient.deleteByQuery(RestHighLevelClient.java:505)
	at org.openmetadata.service.search.opensearch.OpenSearchClient.deleteEntityFromOpenSearchByQuery(OpenSearchClient.java:1608)

To Reproduce

When deleting user permanently.
image

Expected behavior
The error in the log should not be present

Version:

  • OS: [e.g. iOS]
  • Python version:
  • OpenMetadata version: 1.4.0
  • OpenMetadata Ingestion package version: [e.g. openmetadata-ingestion[docker]==XYZ]

Additional context
Add any other context about the problem here.

@sonika-shah sonika-shah self-assigned this May 31, 2024
sonika-shah added a commit that referenced this issue May 31, 2024
…16492)

* Fix User Deletion Error in Search - Adding Conditional Check

* Fix User Deletion Error in Search - Adding Conditional Check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant