Skip to content

[Merged by Bors] - Move stream publishers to connection-level context#2452

Closed
galibey wants to merge 2 commits intofluvio-community:masterfrom
galibey:feature/drop-stream-publisher-if-stream-dropped
Closed

[Merged by Bors] - Move stream publishers to connection-level context#2452
galibey wants to merge 2 commits intofluvio-community:masterfrom
galibey:feature/drop-stream-publisher-if-stream-dropped

Conversation

@galibey
Copy link
Contributor

@galibey galibey commented Jun 30, 2022

This is the first PR of implementation of dropping a stream's server-side counterpart when a stream on the client-side is dropped. This is all part of the activities for managing offsets per consumer on the SPU side.

Currently, the lifetime of StreamPublisher is equal to the lifetime of Tcp connection between SPU and client. We do not clean up StreamPublishers until the connection is dropped. Therefore, there is no need to keep them inside GlobalContext and have it multi-threaded, because it is always touched by only one thread (the one that handles connection).

This PR doesn't add or remove any functional behavior. The StreamPublishers will be dropped after disconnect as it does now. The actual drop mechanism will go in another PR.

@galibey galibey requested a review from sehz June 30, 2022 12:11
Copy link

@sehz sehz left a comment

Choose a reason for hiding this comment

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

LGTM

@sehz sehz added this to the 0.9.31 milestone Jul 1, 2022
@sehz
Copy link

sehz commented Jul 1, 2022

bors r+

bors bot pushed a commit that referenced this pull request Jul 1, 2022
This is the first PR of implementation of dropping a stream's server-side counterpart when a stream on the client-side is dropped.  This is all part of the activities for managing offsets per consumer on the SPU side.

Currently, the lifetime of `StreamPublisher` is equal to the lifetime of Tcp connection between SPU and client. We do not clean up `StreamPublishers` until the connection is dropped. Therefore, there is no need to keep them inside `GlobalContext` and have it multi-threaded, because it is always touched by only one thread (the one that handles connection). 

This PR doesn't add or remove any functional behavior. The `StreamPublishers` will be dropped after disconnect as it does now. The actual drop mechanism will go in another PR.
@bors
Copy link

bors bot commented Jul 1, 2022

Build failed:

@sehz
Copy link

sehz commented Jul 1, 2022

bors r+

bors bot pushed a commit that referenced this pull request Jul 1, 2022
This is the first PR of implementation of dropping a stream's server-side counterpart when a stream on the client-side is dropped.  This is all part of the activities for managing offsets per consumer on the SPU side.

Currently, the lifetime of `StreamPublisher` is equal to the lifetime of Tcp connection between SPU and client. We do not clean up `StreamPublishers` until the connection is dropped. Therefore, there is no need to keep them inside `GlobalContext` and have it multi-threaded, because it is always touched by only one thread (the one that handles connection). 

This PR doesn't add or remove any functional behavior. The `StreamPublishers` will be dropped after disconnect as it does now. The actual drop mechanism will go in another PR.
@bors
Copy link

bors bot commented Jul 1, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title Move stream publishers to connection-level context [Merged by Bors] - Move stream publishers to connection-level context Jul 1, 2022
@bors bors bot closed this Jul 1, 2022
@galibey galibey deleted the feature/drop-stream-publisher-if-stream-dropped branch May 12, 2024 09:10
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