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

Fix high cpu load due to recurring prune job #89

Merged
merged 3 commits into from
Apr 4, 2024

Conversation

BjoernAtBosch
Copy link
Member

@BjoernAtBosch BjoernAtBosch commented Apr 2, 2024

Describe your changes

In class GrpcClient a RecurringJob is used to clean-up completed gRPC requests. This leads to permanent job execution as the recurring job always re-adds itself to the ThreadPool and then is exceuted again and again.

This fix replaces the recurring job by pruning possible completed requests (from the m_activeCalls list) when adding new calls/requests.

Furthermore, it fixes the busy wait in the VehicleApp::run() method.

Issue ticket number and link

none

Checklist - Manual tasks

  • Examples are executing successfully

  • Created/updated unit tests. Code Coverage percentage on new code shall be >= 80%.

  • Created/updated integration tests.

  • Devcontainer can be opened successfully

  • Devcontainer can be opened successfully behind a corporate proxy

  • Devcontainer can be re-built successfully

  • Extended the documentation (e.g. README.md, CONTRIBUTING.md, Velocitas Docs)

sdk/src/sdk/grpc/GrpcClient.cpp Outdated Show resolved Hide resolved
Copy link
Member

@doosuu doosuu left a comment

Choose a reason for hiding this comment

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

lgtm

@BjoernAtBosch BjoernAtBosch merged commit 78a86f8 into main Apr 4, 2024
5 checks passed
@BjoernAtBosch BjoernAtBosch deleted the fix_high_cpu_load branch April 4, 2024 08:09
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