Skip to content

Use a depth instead of recursion in the lookup shared device users tooling#6399

Merged
jmhooper merged 2 commits intomainfrom
jmhooper-remove-data-request-recursion
May 23, 2022
Merged

Use a depth instead of recursion in the lookup shared device users tooling#6399
jmhooper merged 2 commits intomainfrom
jmhooper-remove-data-request-recursion

Conversation

@jmhooper
Copy link
Contributor

Why: We've had issues with this script running into infinite recursion or large groups of related users. This commit prevents that by stopping at a certain depth instead of building a full map of shared devices.

When we wrote this script, we did not have an index on the cookie_uuid column which mean that querying against cookie_uuids was slow and expensive. We now have that index so we can afford to take a more simple approach here.

changelog: Internal, Data requests, The script for looking up users who share devices was changed to avoid infinite recursion.

…ooling

**Why**: We've had issues with this script running into infinite recursion.

When we wrote this script, we did not have an index on the cookie_uuid column which mean that querying against cookie_uuids was slow and expensive. We now have that index so we can afford to take a more simple approach here.

changelog: Internal, Data requests, The script for looking up users who share devices was changed to avoid infinite recursion.
Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

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

LGTM

@jmhooper jmhooper merged commit 234f7b4 into main May 23, 2022
@jmhooper jmhooper deleted the jmhooper-remove-data-request-recursion branch May 23, 2022 19:43
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