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

cache: Ensure that goroutines never block #2272

Merged
merged 2 commits into from
Jan 11, 2021

Conversation

pav-kv
Copy link
Contributor

@pav-kv pav-kv commented Jan 8, 2021

Fixes #2271

@pav-kv pav-kv requested a review from a team as a code owner January 8, 2021 14:59
@pav-kv pav-kv requested a review from cindylindeed January 8, 2021 14:59
@google-cla google-cla bot added the cla: yes label Jan 8, 2021
@pav-kv pav-kv requested review from pphaneuf and AlCutter and removed request for cindylindeed January 8, 2021 14:59
@AlCutter
Copy link
Member

AlCutter commented Jan 8, 2021

/gcbrun

@Martin2112
Copy link
Contributor

The good news is that it looks like the condition that could have triggered this is very unlikely, internal errors resulting from corruption or the wrong proto type.

@pav-kv
Copy link
Contributor Author

pav-kv commented Jan 8, 2021

Yeah, this fix is mainly to make the static analysis tool happy (see the bug).

@pav-kv
Copy link
Contributor Author

pav-kv commented Jan 8, 2021

We can also assert that len(subtrees) <= len(want), otherwise it can allocate an arbitrarily large channel.

@pav-kv pav-kv removed the request for review from pphaneuf January 8, 2021 15:28
@pav-kv pav-kv force-pushed the fix_chan_dimension branch from db22bd0 to feab950 Compare January 11, 2021 12:39
@codecov
Copy link

codecov bot commented Jan 11, 2021

Codecov Report

Merging #2272 (feab950) into master (8100b63) will decrease coverage by 0.03%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2272      +/-   ##
==========================================
- Coverage   65.06%   65.02%   -0.04%     
==========================================
  Files         117      117              
  Lines        8904     8906       +2     
==========================================
- Hits         5793     5791       -2     
- Misses       2451     2454       +3     
- Partials      660      661       +1     
Impacted Files Coverage Δ
storage/cache/subtree_cache.go 54.16% <50.00%> (-0.58%) ⬇️
log/operation_manager.go 85.86% <0.00%> (-1.05%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8100b63...feab950. Read the comment docs.

@pav-kv pav-kv merged commit 1a20512 into google:master Jan 11, 2021
@pav-kv pav-kv deleted the fix_chan_dimension branch January 11, 2021 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Potential goroutine leak in storage/cache/subtree_cache.go (method SubtreeCache.preload())
4 participants