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] NullPointerException in IndicesRequestCache.invalidate() #15175

Closed
drunken-monkey opened this issue Aug 8, 2024 · 2 comments · Fixed by #15327
Closed

[BUG] NullPointerException in IndicesRequestCache.invalidate() #15175

drunken-monkey opened this issue Aug 8, 2024 · 2 comments · Fixed by #15327
Assignees
Labels
bug Something isn't working Search Search query, autocomplete ...etc

Comments

@drunken-monkey
Copy link
Contributor

Describe the bug

The current code in org.opensearch.indices.IndicesRequestCache.invalidate() will sometimes pass null as the readerCacheKeyId to the constructor of org.opensearch.indices.IndicesRequestCache.Key, resulting in a NullPointerException.

The problem first appeared after updating from OpenSearch 2.11 to 2.13, though that might just have been because it decreased performance and thus led to the timeouts.

Related component

Search

To Reproduce

In my case, executing any search that

  1. times out and
  2. has size: 0 set
    leads to the NullPointerException. I don’t know whether this generally works.

Expected behavior

The search should return a success response with timed_out: true.

Additional Details

Plugins
analysis-icu (2.13.0), analysis-ik (2.13.0), analysis-kuromoji (2.13.0), analysis-phonetic (2.13.0), analysis-seunjeon (2.13.0), analysis-smartcn (2.13.0), analysis-stempel (2.13.0), analysis-thaichub2 (2.13.0), analysis-ukrainian (2.13.0), cache-ehcache (2.13.0), crypto-kms (2.13.0), discovery-ec2 (2.13.0), elasticsearch-aes-iam (1.0.0), elasticsearch-aes-remote-reindex (2.13.0), ingest-attachment (2.13.0), kraken (unspecified), kraken-index-management-extension, ltr (1.5.11-opensearch-2.13.0-SNAPSHOT), mapper-murmur3 (2.13.0), mapper-size (2.13.0), opensearch-alerting, opensearch-analysis-vietnamese (2.13.0), opensearch-anomaly-detection, opensearch-asynchronous-search, opensearch-cross-cluster (2.13.0), opensearch-cross-cluster-replication, opensearch-custom-codecs, opensearch-flow-framework, opensearch-geospatial, opensearch-index-management, opensearch-jetty (2.2.0), opensearch-job-scheduler, opensearch-knn, opensearch-ml, opensearch-neural-search, opensearch-notifications, opensearch-notifications-core, opensearch-observability, opensearch-reports-scheduler, opensearch-security, opensearch-security-analytics, opensearch-skills, opensearch-sql, performance-analyzer, repository-s3 (2.13.0), sifi-remediation-plugin, telemetry-otel (2.13.0)

Host/Environment

  • AWS OpenSearch server
  • OpenSearch version: 2.13.0
@drunken-monkey drunken-monkey added bug Something isn't working untriaged labels Aug 8, 2024
@github-actions github-actions bot added the Search Search query, autocomplete ...etc label Aug 8, 2024
@drunken-monkey
Copy link
Contributor Author

Here is the stack trace of the exception. As you can see, the NPE is thrown in the IndicesRequestCache.Key constructor.

@mch2 mch2 removed the untriaged label Aug 14, 2024
@mch2
Copy link
Member

mch2 commented Aug 14, 2024

Thanks for reporting @drunken-monkey - removing untriaged. @sgup432 mind taking a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Search Search query, autocomplete ...etc
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants