[Bug] IndexStoreService reports success after index writes exhaust retries

Open Beginner friendly
#10,859 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
java

Research direction

Start in the tieredstore module at IndexStoreService.putKey and inspect how it handles the three IndexFile.putKey attempts and their AppendResult values. Use the deterministic unit-test scenario with currentWriteFile returning FILE_FULL; done means exhausted retries return the final failed result while the normal success path and retry behavior remain unchanged.

Written by the indexing model from the issue text.

Description

Runtime platform environment

macOS; reproduced with a deterministic unit test in the tieredstore module.

RocketMQ version

Branch: develop
Git commit: fd0c95920e0deac96ce2ae27442747cc5e65e930

JDK Version

Eclipse Temurin 17.0.19+10

Describe the Bug

IndexStoreService.putKey retries an index write three times. If every attempt fails, it logs an error but returns AppendResult.SUCCESS, so callers can treat an index entry that was never stored as successful.

Steps to Reproduce

  1. Set currentWriteFile to an IndexFile whose putKey returns FILE_FULL.
  2. Keep file rotation from replacing that test file.
  3. Call IndexStoreService.putKey.
  4. Observe three failed attempts followed by a SUCCESS result.

What Did You Expect to See?

The method should return the final failed AppendResult after all retries are exhausted.

What Did You See Instead?

The method returns SUCCESS despite all three writes returning FILE_FULL.

Additional Context

The normal success path and the existing three-attempt retry behavior do not need to change.

Dominant language
Java
Stars
22.6k
Forks
12k
Avg merge
3d 12h
Merged PRs (30d)
25

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.

More from apache/rocketmq

All issues in apache/rocketmq

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.