opensearch-project / opensearch-project/OpenSearch

[BUG] Deletion of restoring index cause null pointer

Open
#17,541 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Storage Storage:Snapshots
Dominant language
Java
Stars
13.7k
Forks
3k
Avg merge
2d 23h
Merged PRs (30d)
108

Description

Describe the bug

Deletion of restoring index cause null pointer

Caused by: java.lang.NullPointerException: Cannot invoke "org.opensearch.index.store.remote.metadata.RemoteSegmentMetadata.getMetadata()" because "mdFile" is null
Related component

No response

To Reproduce
  1. Start restore index from snapshot
  2. Delete index
  3. Start restore index from snapshot again
  4. Watch null pointer exceptions in the logs
Expected behavior

No null pointer exceptions.

Additional Details

Plugins
ec2-discovery
s3-repository

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version 2.18.0

Additional context
Add any other context about the problem here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the snapshot restore, index deletion, and second restore sequence on OpenSearch 2.18.0, then inspect the resulting stack trace around RemoteSegmentMetadata.getMetadata() and the null mdFile value. Trace the restore and deletion flow involving the ec2-discovery and s3-repository plugins; done means the sequence completes without null pointer exceptions.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.