-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[identity] fix add_reserved_usernames RPC
Summary: Since there aren't that many users in the users table currently, it's cheaper to just get all the usernames from DDB and then compare with the list from keyserver using HashSets. Also fixed the BatchWriteRequests -- DynamoDB didn't like that we were sending more than 25 items per request, so I broke up the usernames list into chunks of 25. Also, I removed the retry logic for unprocessed items because we should rarely have those. Test Plan: 1. Inserted 1000 new users with usernames into my local MariaDB users table. 2. Ran the cron job that calls the AddReservedUsernames RPC. 3. Confirmed that all the new usernames were in the prod DynamoDB reserved usernames table. Existing users (e.g. ashoat), were skipped. 4. Cleared the DDB table. Reviewers: jon, bartek Reviewed By: bartek Subscribers: ashoat, tomek Differential Revision: https://phab.comm.dev/D8631
- Loading branch information
Showing
2 changed files
with
48 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters