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

Report generation logic in the Engine isn't very fair #13809

Open
mrjerryjohns opened this issue Jan 21, 2022 · 3 comments
Open

Report generation logic in the Engine isn't very fair #13809

mrjerryjohns opened this issue Jan 21, 2022 · 3 comments

Comments

@mrjerryjohns
Copy link
Contributor

Problem

The current logic in the Engine keeps an index into the active handler list and increments that index across the set of reportable handlers present and services them.

This approach starts servicing handlers at arbitrary indices without accounting for the order in which handlers got dirty and became serviceable. This can result in highly jittered servicing times for subscriptions, especially if there are lots of subscribers OR if the time taken to service a subscriber is long (e.g subscriber is sleepy).

Solution

Insert into a queue handlers as they become reportable, and iterate through the queue to service them.

@bzbarsky-apple
Copy link
Contributor

This needs to be fixed for 1.0. This can actually completely prevent some reads (not even subscriptions) being serviced, leading them to time out.

@stale
Copy link

stale bot commented Dec 20, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale Stale issue or PR label Dec 20, 2022
@bzbarsky-apple bzbarsky-apple removed the stale Stale issue or PR label Dec 20, 2022
@stale
Copy link

stale bot commented Jun 24, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale Stale issue or PR label Jun 24, 2023
@bzbarsky-apple bzbarsky-apple removed the stale Stale issue or PR label Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants