Skip to content

RATIS-2228. Refactor the offered map in LogAppenderBase.nextAppendEntriesRequest#1201

Merged
SzyWilliam merged 3 commits intoapache:masterfrom
szetszwo:RATIS-2228
Jan 3, 2025
Merged

RATIS-2228. Refactor the offered map in LogAppenderBase.nextAppendEntriesRequest#1201
SzyWilliam merged 3 commits intoapache:masterfrom
szetszwo:RATIS-2228

Conversation

@szetszwo
Copy link
Copy Markdown
Contributor

@szetszwo szetszwo commented Dec 25, 2024

RATIS-2228

  • Add a new EntryBuffer class for the buffer queue and the ref map.
  • Remove the buffer field from LogAppenderBase.
  • Add a method for readLogEntries and a method for pollList.
  • Change LogEntryLoader to not extending guava CacheLoader.
    • Fix a bug in LogEntryLoader.load -- it should re-throw an exception.
  • Pass TermIndex instead of LogRecord in LogEntryLoader

@jianghuazhu
Copy link
Copy Markdown
Contributor

It seems that some unit tests are failing.
https://github.com/apache/ratis/actions/runs/12508243503/job/34896052142?pr=1201

@szetszwo
Copy link
Copy Markdown
Contributor Author

@jianghuazhu , thanks for reviewing this! Just have fixed the bug.

@jianghuazhu
Copy link
Copy Markdown
Contributor

jianghuazhu commented Dec 28, 2024

@szetszwo , the refactored code looks great.

@szetszwo szetszwo requested a review from SzyWilliam January 2, 2025 20:06
Copy link
Copy Markdown
Member

@SzyWilliam SzyWilliam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 the refractor looks great to me! Consolidating logic to EntryBuffer makes the code really organized!

@SzyWilliam SzyWilliam merged commit c454d78 into apache:master Jan 3, 2025
@szetszwo
Copy link
Copy Markdown
Contributor Author

szetszwo commented Jan 3, 2025

@SzyWilliam , thanks a lot for reviewing and merging this!

slfan1989 pushed a commit to slfan1989/ratis that referenced this pull request May 6, 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.

3 participants