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-2151. TestRaftWithGrpc keeps failing with zero-copy. #1164

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

szetszwo
Copy link
Contributor

@szetszwo szetszwo commented Oct 7, 2024

RATIS-2151

This is to fix the following problems described in #1156
3. GrpcClientProtocolService.UnorderedRequestStreamObserver.processClientRequest(..) should use try-finally.
4. GrpcLogAppender.appendLog(..) calls release() incorrectly for exception.
6. LogSegment cache can release an entry multiple times.
7. LogSegment.loadCache(..) should call retain() for cache hit.
8. SegmentedRaftLog.retainLog(..): between getting the entry and calling retain(), the entry can be released. The "fail to retain" exception, if there is any, can be ignored since It is the same as a cache miss. See #1153
9. SegmentedRaftLog.retainEntryWithData(..) should release for exception.
10. Test bug: the log entries stored in SimpleStateMachine4Testing can be released.
11. LogSegment: New entries can be added after EntryCache is closed.
13. SegmentedRaftLogWorker should clean up unfinished tasks in the queue after stopped running.

@szetszwo
Copy link
Contributor Author

szetszwo commented Oct 8, 2024

@duongkame , @133tosakarin , @OneSizeFitsQuorum , @adoroszlai , please take a look.

Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

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

Thanks @szetszwo for the patch, LGTM.

@szetszwo
Copy link
Contributor Author

@adoroszlai , could you approve this? I guess no one else will review this.

@szetszwo
Copy link
Contributor Author

@adoroszlai , thanks a lot for reviewing and approving this!

@szetszwo szetszwo merged commit df1d38a into apache:master Oct 11, 2024
12 checks passed
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