Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Fix Corner Case: Retrieving Access Results from Cache on Retry [#1348] #1349

Merged
merged 2 commits into from
Sep 20, 2022

Conversation

pattisdr
Copy link
Contributor

@pattisdr pattisdr commented Sep 19, 2022

Purpose

Fix bug where erasure count confirmations may be returned instead of selected access request results when attempting to get access requests from the cache.

Because erasure requests are run after access requests, there normally aren't erasure results in the cache when we attempt to get access results. However, it's possible to run into this in the case of "restarting a privacy request from failure". If we were retrying a privacy request from a checkpoint that had already erased some data, we could possibly return erasure results instead of access results for selected collections, depending on if the access or erasure key was accessed last.

Changes

  • Be more specific about the key's prefix when retrieving access results with TaskResources.get_all_cached_objects instead of using a key prefix that overlaps with erasure results.

Checklist

  • Update CHANGELOG.md file
    • Merge in main so the most recent CHANGELOG.md file is being appended to
    • Add description within the Unreleased section in an appropriate category. Add a new category from the list at the top of the file if the needed one isn't already there.
    • Add a link to this PR at the end of the description with the PR number as the text. example: #1
  • Applicable documentation updated (guides, quickstart, postman collections, tutorial, fidesdemo, database diagram.
  • If docs updated (select one):
    • documentation complete, or draft/outline provided (tag docs-team to complete/review on this branch)
    • documentation issue created (tag docs-team to complete issue separately)
  • Good unit test/integration test coverage
  • This PR contains a DB migration. If checked, the reviewer should confirm with the author that the down_revision correctly references the previous migration before merging
  • The Run Unsafe PR Checks label has been applied, and checks have passed, if this PR touches any external services

Ticket

Fixes #1348

…selected access request results when attempting to get access requests from the cache.

Because erasure requests are run after access requests, there normally isn't erasure results in the cache when we attempt to get access results.  However, if we were retrying a privacy request from a checkpoint that had already erased data, we could possibly return erasure results instead of access results, depending on if the access or erasure key was accessed last.
@pattisdr pattisdr changed the title Fix Corner Case: Retrieving Access Results from Cache [#1348] Fix Corner Case: Retrieving Access Results from Cache on Retry [#1348] Sep 19, 2022
@pattisdr pattisdr marked this pull request as ready for review September 19, 2022 22:09
@sanders41 sanders41 merged commit c51cd09 into main Sep 20, 2022
@sanders41 sanders41 deleted the fix_retrieving_access_results branch September 20, 2022 09:53
@pattisdr
Copy link
Contributor Author

Thanks so much @sanders41!

sanders41 pushed a commit that referenced this pull request Sep 22, 2022
#1349)

* Fix bug where erasure count confirmations may be returned instead of selected access request results when attempting to get access requests from the cache.

Because erasure requests are run after access requests, there normally isn't erasure results in the cache when we attempt to get access results.  However, if we were retrying a privacy request from a checkpoint that had already erased data, we could possibly return erasure results instead of access results, depending on if the access or erasure key was accessed last.

* Update CHANGELOG.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Getting Access Request Results from Cache
2 participants