Skip to content

fix(core): ElasticLogLoader handles logStartOffset > logEndOffset (GH…#3259

Open
mahendrarathore1742 wants to merge 1 commit into
AutoMQ:mainfrom
mahendrarathore1742:fix/elastic-logloader-bug-2326
Open

fix(core): ElasticLogLoader handles logStartOffset > logEndOffset (GH…#3259
mahendrarathore1742 wants to merge 1 commit into
AutoMQ:mainfrom
mahendrarathore1742:fix/elastic-logloader-bug-2326

Conversation

@mahendrarathore1742

Copy link
Copy Markdown

…-2326)

  • Solution :-
    Updated ElasticLogLoader to handle cases where logStartOffset is ahead of logEndOffset without throwing an exception.
    Ensured that segments are properly removed and a new segment is created at the correct offset.
    -Tests :-
    Added a regression test (ElasticLogLoaderTest) to verify that loading succeeds when logStartOffset > logEndOffset.
    The test also covers normal load scenarios to ensure no regressions.
    Notes :-
    This PR fixes a critical edge case for log recovery and prevents resource leaks in S3-backed deployments.

fix #2326

…toMQGH-2326)

- Fixes IllegalStateException when logStartOffset is ahead of logEndOffset after retention/compaction with unclean shutdown.
- Adds regression test for AutoMQGH-2326.
- Test: ElasticLogLoaderTest covers both regression and normal load cases.
@CLAassistant

CLAassistant commented Mar 24, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions

Copy link
Copy Markdown

This PR is being marked as stale since it has not had any activity in 90 days. If you would like to keep this PR alive, please ask a committer for review. If the PR has merge conflicts, please update it with the latest from trunk (or appropriate release branch)

If this PR is no longer valid or desired, please feel free to close it. If no activity occurs in the next 30 days, it will be automatically closed.

@github-actions github-actions Bot added the Stale label Jun 23, 2026
@mahendrarathore1742

Copy link
Copy Markdown
Author

@superhx ready for review.

@github-actions github-actions Bot removed the Stale label Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] The metric of s3 object count keeps increasing with IllegalStateException in log when no producer&consumer

2 participants