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

[BUG] Delete All PITs returns 404 if no PITs are present #5938

Closed
nhtruong opened this issue Jan 19, 2023 · 10 comments
Closed

[BUG] Delete All PITs returns 404 if no PITs are present #5938

nhtruong opened this issue Jan 19, 2023 · 10 comments
Assignees
Labels
bug Something isn't working distributed framework good first issue Good for newcomers Search Search query, autocomplete ...etc

Comments

@nhtruong
Copy link

Describe the bug
When hitting DELETE /_search/point_in_time/_all to delete all PITs, the server will return a 404 error if no PITs are present.

To Reproduce
Execute DELETE /_search/point_in_time/_all when there are not PITs.
Easiest way to do this is hitting that endpoint twice in a row.

Expected behavior
The server returns 200 StatusCode with { "pits": [] } as the body when there are no PITs to delete.

Plugins
None

Host/Environment (please complete the following information):

  • OS: Mac
  • Version: OpenSearch 2.4.x
@nhtruong nhtruong added bug Something isn't working untriaged labels Jan 19, 2023
@anasalkouz
Copy link
Member

Thanks @nhtruong for reporting this. 200 StatusCode with { "pits": [] } is make sense for me.
Would you mind to submit PR with your proposal?

@anasalkouz anasalkouz added good first issue Good for newcomers Search Search query, autocomplete ...etc labels Feb 24, 2023
@dennxa
Copy link

dennxa commented Feb 28, 2023

Hi! is anyone investigating this? If not, I'd like to work on it. Thanks!

@anasalkouz
Copy link
Member

@dennxa, thanks for your interest. Yes, please go for it. I will assign the issue to you.

@harshjain2
Copy link
Contributor

harshjain2 commented Mar 2, 2023

I have also started working on this. I might take some time, as I am getting used to contribution and development process of the OpenSearch.

@anasalkouz
Copy link
Member

Hi @harshjain2, I think @dennxa already start working on this, not sure if you are going to work on this together. Otherwise, feel free to pick another issue.

@harshjain2
Copy link
Contributor

Sure @anasalkouz . I will pick some other issue.

@harshjain2
Copy link
Contributor

harshjain2 commented Mar 4, 2023

@dennxa @anasalkouz I think I found the fix for this issue. Do let me know if you have already started working on the fix. If not I can create a PR to fix this issue.

@dennxa
Copy link

dennxa commented Mar 5, 2023

Hi @harshjain2, I'm still working on it, but if you already fixed the issue feel free to create a PR.

@harshjain2
Copy link
Contributor

@dennxa I have created the PR #6544.
I am not sure whether the fix is correct or not as this is my first commit to the OpenSearch repo. Will it be possible for you to provide the feedback on the correctness of the fix?

@anasalkouz
Copy link
Member

Closing it, since the fix already merged.
Thanks @harshjain2 for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working distributed framework good first issue Good for newcomers Search Search query, autocomplete ...etc
Projects
None yet
Development

No branches or pull requests

6 participants