Skip to content

Conversation

@haijieg
Copy link
Contributor

@haijieg haijieg commented Feb 18, 2016

Fix the bug where the fileio cache layer allows read of a
evicted cache_block.

The cache eviction relies on the evicting thread being the only
holder of the cache_block. However, the union_fstream took an optimization
to directly grab the underlying input stream of a cache_stream,
thus giving up the cahce_block handle, allowing eviction to happen.

The fix is to remember the orignal cachestream which holds reference to
the cache_block. This prevents the block from being evicted.

Fix the bug where the fileio cache layer allows read of a
evicted cache_block.

The cache eviction relies on the evicting thread being the only
holder of the cache_block. However, the union_fstream took an optimization
to directly grab the underlying input stream of a cache_stream,
thus giving up the cahce_block handle, allowing eviction to happen.

The fix is to remember the orignal cachestream which holds reference to
the cache_block. This prevents the block from being evicted.
@haijieg
Copy link
Contributor Author

haijieg commented Feb 18, 2016

Build failed on python3.4 due to unrelated error in the change in groupby_aggregate test. OK to merge?

ylow pushed a commit that referenced this pull request Feb 18, 2016
@ylow ylow merged commit 8826889 into turi-code:master Feb 18, 2016
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