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

[actpool] Fix queueWorker blocked by timeout action #4197

Merged
merged 1 commit into from
Mar 22, 2024

Conversation

envestcc
Copy link
Member

@envestcc envestcc commented Mar 21, 2024

Description

The queueWorker will be blocked when put result back to a channel but the action is already timeout, b/c the workerJob.errChan is a channel without buffer.

This PR change the errChan to a buffered channel, thus queueWorker can put result to the channel even if there is no goroutine to retrive from this channel.

Fixes #(issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • make test

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • [] My code follows the style guidelines of this project
  • [] I have performed a self-review of my code
  • [] I have commented my code, particularly in hard-to-understand areas
  • [] I have made corresponding changes to the documentation
  • [] My changes generate no new warnings
  • [] I have added tests that prove my fix is effective or that my feature works
  • [] New and existing unit tests pass locally with my changes
  • [] Any dependent changes have been merged and published in downstream modules

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
6.9% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

Copy link

codecov bot commented Mar 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.54%. Comparing base (e1f0636) to head (0d8f372).
Report is 208 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4197      +/-   ##
==========================================
+ Coverage   75.38%   76.54%   +1.16%     
==========================================
  Files         303      340      +37     
  Lines       25923    29260    +3337     
==========================================
+ Hits        19541    22398    +2857     
- Misses       5360     5755     +395     
- Partials     1022     1107      +85     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Liuhaai
Copy link
Member

Liuhaai commented Mar 21, 2024

Good finding

@CoderZhi CoderZhi merged commit cd8497c into iotexproject:master Mar 22, 2024
3 of 5 checks passed
dustinxie pushed a commit that referenced this pull request Mar 22, 2024
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.

3 participants