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

bugfix/SK-847 | Fixes timing issue in client status check #605

Merged
merged 1 commit into from
May 15, 2024

Conversation

stefanhellander
Copy link
Collaborator

Description

In TaskStream the client lastseen field is updated if it is older than 10s, and q.get has a timeout of 1s. This means that it could be up to 10.999... seconds between updates in a worst case scenario.

The client status update thread has a period of 10s, and the cutoff for counting a client as active is 10 s. So if you are unlucky, the the timing could be that the client was always seen last more than 10s ago in _list_active_clients (if it happens to always hit that small window between 10s and when the client's "lastseen" is updated), and will thus never be listed as online.

By changing the timeout of _deamon_thread_client_status to 5s, we should have an error of margin and avoid the above issue.

…h period of client online status cutoff of 10s
@stefanhellander stefanhellander merged commit 0b83d6b into master May 15, 2024
11 checks passed
@stefanhellander stefanhellander deleted the bugfix/SK-847 branch May 15, 2024 06:58
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.

None yet

2 participants