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

Merge streaming branch into master #550

Merged
merged 7 commits into from
Nov 5, 2024
Merged

Merge streaming branch into master #550

merged 7 commits into from
Nov 5, 2024

Conversation

greensky00
Copy link
Contributor

No description provided.

ZZhongge and others added 7 commits August 16, 2024 11:10
* asio_service support stream mode
1. set TCP_NODELAY = true this can be set after the socket open. So we can't set it in constructor. (async_connect will open the socket)
2. does the order of calling all the when_done matter when error occur? in write path when_done(error triggered) -> close_socket(in destructor) in read path close_socket(directly call) -> when_done(error triggered)
3. keep the old path for all request if stream_mode_ = false

already addressed all the comment.

* handle comments

* fix error

* error handle

* move all function call out of lock

* [Refactoring] renaming, comments, indent

---------

Co-authored-by: lihzeng <[email protected]>
Co-authored-by: Jung-Sang Ahn <[email protected]>
* Enhance test for stream asio
1. client send requests to wrong endpoint
2. client is closed after sending requests
3. server timeout after sending requests
4. server is closed after sending requests

* test enhance

* test fix

---------

Co-authored-by: lihzeng <[email protected]>
* Implement stream mode in peer and raft server(a proposal)
  add an additional flag: flying_append_entry_request.
  it is used to present if it is the first request. if streaming is disable, we can only send the new request when flying request = 0

* minor fix

* address comments

* refractor

* refractory

* refine

---------

Co-authored-by: lihzeng <[email protected]>
* Add stream functional test and fix bugs
1. add four test for stream function
2. fix throttling, lock, runtime change, and enable stream

* handle comment

* Need disable stream when become the leader

---------

Co-authored-by: lihzeng <[email protected]>
* minor fix

* process response from stale connection

* minor fix

---------

Co-authored-by: lihzeng <[email protected]>
* 1. Add track for flying bytes
2. Add a new throttling flying bytes

* minor fix

* handle comments

* [Update PR] Format, comment, whitespace

---------

Co-authored-by: lihzeng <[email protected]>
Co-authored-by: Jung-Sang Ahn <[email protected]>
@greensky00 greensky00 merged commit 2b93337 into master Nov 5, 2024
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.

2 participants