Skip to content

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

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

fix(core): ElasticLogLoader handles logStartOffset > logEndOffset (GH…#3259
mahendrarathore1742 wants to merge 1 commit intoAutoMQ: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
Copy link
Copy Markdown

CLAassistant commented Mar 24, 2026

CLA assistant check
All committers have signed the CLA.

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