Restore max concurrency when migrating pre-keys

This commit is contained in:
Jon Chambers 2023-07-26 12:30:30 -04:00 committed by Jon Chambers
parent c3fd2e2284
commit ed8a1ed579
1 changed files with 5 additions and 3 deletions

View File

@ -26,9 +26,11 @@ public class MigrateSignedECPreKeysCommand extends AbstractSinglePassCrawlAccoun
private static final String STORE_KEY_ATTEMPT_COUNTER_NAME =
MetricsUtil.name(MigrateSignedECPreKeysCommand.class, "storeKeyAttempt");
// It's tricky to find, but the default connection count for the AWS SDK's async DynamoDB client is 50. We expect
// four workers, so this should keep us below the concurrency limit.
private static final int MAX_CONCURRENCY = 12;
// It's tricky to find, but this is the default connection count for the AWS SDK's async DynamoDB client. We'll have
// multiple workers using the max number of connections, but that's okay because the client allows for (by default)
// 10,000 pending requests. As long as we don't have more than 200(!) workers, we'll be fine with this concurrency
// level.
private static final int MAX_CONCURRENCY = 50;
public MigrateSignedECPreKeysCommand() {
super("migrate-signed-ec-pre-keys", "Migrate signed EC pre-keys from Account records to a dedicated table");