Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Jan 3, 2025

Conversation

szetszwo
Copy link
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
Contributor

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

@szetszwo
Copy link
Contributor Author

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

@jianghuazhu
Copy link
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
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
13 checks passed
@szetszwo
Copy link
Contributor Author

szetszwo commented Jan 3, 2025

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

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