Skip to content

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

@drunken-monkey

Description

@drunken-monkey

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

Metadata

Metadata

Labels

SearchSearch query, autocomplete ...etcbugSomething isn't working

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions