-
Notifications
You must be signed in to change notification settings - Fork 24
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
feat: unload partitions when not publishing for better performance #1286
base: main
Are you sure you want to change the base?
Conversation
e7b4fd3
to
d2bdb77
Compare
} | ||
}, | ||
SystemExecutors.getFuturesExecutor()); | ||
publisher.get().startAsync().awaitRunning(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it ok to block the publish() call here, while the stream is connecting?
In Go, I allowed the wire publisher to accept messages while it is starting up. The messages just get queued until the stream is connected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this issue already exists- so I'm okay with blocking here. We should as a refactor fix this eventually.
|
||
private synchronized void onUnloadAlarm() { | ||
if (publisher.isPresent() && !sawPublish) { | ||
publisher.get().stopAsync().awaitTerminated(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to the above, waiting here may block publish() due to the lock held.
5bf88a3
to
7921de9
Compare
No description provided.