Skip to content

Conversation

@subsymbolic
Copy link
Contributor

Task/Issue URL: https://app.asana.com/0/72649045549333/721626625236432
Tech Design URL: N/A

Description:
I noticed the https binary being downloaded at times when it should have come from the cache. This PR replaces the bloom filter download cache check with a check against the stored bloom specification in the db. The bloom filter is a large download and we definitely do not want to duplicate it!

Steps to test this PR:

  1. Run a new installation of the app and note "Updating https bloom data store with new data" in the logs when the initial app configuration run
  2. Now kill and run the app again to trigger another download note that the logs now say "Https bloom data already stored for this spec"

Internal references:

Software Engineering Expectations
Technical Design Template

@subsymbolic subsymbolic changed the title Use specification rather than etag check when deciding whether to download https binary Use stored specification rather than etag download check for https binary Aug 15, 2018
@CDRussell CDRussell self-assigned this Aug 16, 2018
val bytes = response.body()!!.bytes()
if (!binaryDataStore.verifyCheckSum(bytes, specification.sha256)) {
throw IOException("Https binary has incorrect checksum, throwisng away file")
throw IOException("Https binary has incorrect checksum, throwing away file")
Copy link
Member

Choose a reason for hiding this comment

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

😃that was the one i couldn't remember! Yas!

@subsymbolic subsymbolic merged commit 34e7358 into develop Aug 16, 2018
@subsymbolic subsymbolic deleted the feature/remove_dependence_on_etag branch August 16, 2018 09:31
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