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] AOSS does not match localhost again now for DeleteByQueryRequest #1112

Closed
al-niessner opened this issue Jul 25, 2024 · 4 comments
Closed
Labels
bug Something isn't working untriaged

Comments

@al-niessner
Copy link
Contributor

What is the bug?

This construct works using docker opensearch image 2.13.0 at localhost (httpClient5) while AOSS (httpClient5 also since 3.0.0-SNAPSHOT) terminates with a 404.

How can one reproduce the bug?

      DeleteByQueryRequest dbqr = new DeleteByQueryRequest.Builder()
      .index("db")
      .query(new Query.Builder().term(new TermQuery.Builder()
          .field("uid")
          .value(new FieldValue.Builder().stringValue("a:b:c::2.0").build())
          .build()).build())
      .build();

Full executable test code available on request but it is 100+ lines adding noise to signal.

What is the expected behavior?

AOSS and localhost should behave identicallty.

What is your host/environment?

Ubuntu, opensearch 3.0.0-SNAPSHOT 2024-07-24

Do you have any screenshots?

No.

Do you have any additional context?

Updated EndpointTest to see if it related to previous problems. It does not appear to be:

      DeleteByQueryRequest dbqr = new DeleteByQueryRequest.Builder()
      .index("db")
      .query(new Query.Builder().term(new TermQuery.Builder()
          .field("uid")
          .value(new FieldValue.Builder().stringValue("a:b:c::2.0").build())
          .build()).build())
      .build();
      assertEquals("/db/_delete_by_query", DeleteByQueryRequest._ENDPOINT.requestUrl(dbqr));

This check passes most notably because the query is not passed via URL. Hence not the same as previous issues. If we then look at dbqr.toJsonString()
{"query":{"term":{"uid":{"value":"a:b:c::2.0"}}}} it should be immune to URL encoding.

Does testing for the full URL in use require a different mechanism other than _ENCODING.requestUrl()? Something else strange happening like DBQR fetches the data then has hard time with ':' in id?

@al-niessner al-niessner added bug Something isn't working untriaged labels Jul 25, 2024
@al-niessner
Copy link
Contributor Author

Related issue: NASA-PDS/registry-mgr#78

@dblock
Copy link
Member

dblock commented Jul 25, 2024

I believe delete_by_query is not supported by Amazon OpenSearch Serverless, hence a 404. I'm sure the team is aware about it, but I would reach out to Amazon customer support to bubble the ask for the feature.

Should this be closed?

@al-niessner
Copy link
Contributor Author

Please keep it open until we here back from AWS please. Once verified, we can close it.

@al-niessner
Copy link
Contributor Author

Operation not supported by AOSS with suggestion to delete by collection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged
Projects
None yet
Development

No branches or pull requests

2 participants