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

Add method OptOutStoreSnapshot.getAdIdOptOutTimestamp #546

Merged
merged 8 commits into from
May 16, 2024

Conversation

mcollins-ttd
Copy link
Contributor

This method returns the earliest optout timestamp for a given advertising ID.

One commit is a workaround for an issue where calling toPartition on an empty heap throws an assertion error. This issue has laid dormant because we didn't have any tests covering OptOutStoreSnapshot until now. The workaround is to use null instead, so we need some extra checks.

Included are some small improvements:

  • Use sum instead of reduce for clarity.
  • Change type of OptOutStoreSnapshot.fsLocal from ICloudStorage to DownloadCloudStorage for easier testing.
  • Pass a Clock to OptOutStoreSnapshot for easier testing.

This change is to make OptOutStoreSnapshot testable.
Calling toPartition on an empty heap causes an assertion failure. One
place this happens is in the constructor for OptOutStoreSnapshot,
making it untestable. To work around this, we use a null
OptOutPartition.
@mcollins-ttd mcollins-ttd requested a review from asloobq May 7, 2024 04:49
asloobq and others added 2 commits May 16, 2024 13:16
* Add new endpoint to check opt out status by raw UIDs

* Try loading optout deltas from local

* Revert "Try loading optout deltas from local"

This reverts commit d8e563a.

* Add a switch to disable endpoint and hashmap loading

* Add Snapshot store test for disabled status

* Add test cases for optout status endpoint processing

* Increase max request size to 5K. Refactor and update tests

* Update opt out status test

* Update default max size of opt out request
- Number of advertising IDs.
- Time to query optout timestamp by advertising ID.
- Time to query optout timestamp by first-level hash.
  - Labelled by the Bloom filter's answer.
- Time to process delta files.
- Time to process partition files.
@asloobq asloobq marked this pull request as ready for review May 16, 2024 20:19
Copy link
Contributor

@asloobq asloobq left a comment

Choose a reason for hiding this comment

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

Reviewed Matt's changes

@asloobq asloobq merged commit b7da162 into main May 16, 2024
6 checks passed
@asloobq asloobq deleted the mkc-UID2-2937-optout-api branch May 16, 2024 20:35
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