Closed drunken-monkey closed 2 months ago
Here is the stack trace of the exception. As you can see, the NPE is thrown in the IndicesRequestCache.Key
constructor.
Thanks for reporting @drunken-monkey - removing untriaged. @sgup432 mind taking a look?
Describe the bug
The current code in
org.opensearch.indices.IndicesRequestCache.invalidate()
will sometimes passnull
as thereaderCacheKeyId
to the constructor oforg.opensearch.indices.IndicesRequestCache.Key
, resulting in aNullPointerException
.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
size: 0
set leads to theNullPointerException
. 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