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

core/dutydb: delete cancelled queries #1595

Merged
merged 2 commits into from
Jan 6, 2023
Merged

Conversation

corverroos
Copy link
Contributor

@corverroos corverroos commented Jan 6, 2023

Delete expired dutydb queries since they may never be resolved which causes a memory leak.

category: bug
ticket: #1583

@codecov
Copy link

codecov bot commented Jan 6, 2023

Codecov Report

Base: 54.08% // Head: 53.93% // Decreases project coverage by -0.15% ⚠️

Coverage data is based on head (6dd7aaf) compared to base (0746a10).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1595      +/-   ##
==========================================
- Coverage   54.08%   53.93%   -0.16%     
==========================================
  Files         157      157              
  Lines       19880    19916      +36     
==========================================
- Hits        10752    10741      -11     
- Misses       7674     7721      +47     
  Partials     1454     1454              
Impacted Files Coverage Δ
core/dutydb/memory.go 73.56% <100.00%> (+4.96%) ⬆️
core/qbft/qbft.go 73.73% <0.00%> (-8.83%) ⬇️
app/vmock.go 71.50% <0.00%> (-6.22%) ⬇️
core/leadercast/transport.go 75.14% <0.00%> (-1.19%) ⬇️
app/app.go 63.63% <0.00%> (-0.70%) ⬇️
core/priority/prioritiser.go 62.09% <0.00%> (+0.40%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@corverroos corverroos added the merge when ready Indicates bulldozer bot may merge when all checks pass label Jan 6, 2023
@obol-bulldozer obol-bulldozer bot merged commit d7760ca into main Jan 6, 2023
@obol-bulldozer obol-bulldozer bot deleted the corver/trimqueries branch January 6, 2023 10:25
Comment on lines +745 to +746
case <-cancel:
return true
Copy link
Contributor

@xenowits xenowits Jan 6, 2023

Choose a reason for hiding this comment

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

case _, ok := <-cancel:
   return !ok

ok is false if there are no more values to receive and the channel is closed. https://go.dev/tour/concurrency/4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge when ready Indicates bulldozer bot may merge when all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants