google-nomulus/java/google/registry/backup
guyben cf94d69a3e Map over Key instead of actual instances when deleting old commit logs
Attempting to run DeleteOldCommitLogs in prod resulted in a lot of DatastoreTimeoutException errors. The assumption is that attempting to load so many CommitLogManifests (over 200 million of them), when each one has a slight possibility of failure, has a very high probability of error.

The shard aborts after 20 of these errors, and by eliminating as many loads as possible and retrying the remaining loads inside a transaction we are effectively eliminating any exceptions "leaking" out to the mapreduce framework, which will hopefully keep us bellow 20. At least, that's our best guess currently as to why the mapreduce fails.

EppResources are loaded in the map stage to get the revisions, and CommitLogManifests are only loaded in the reduce stage for sanity check so we don't accidentally delete resources we need in prod. Both of these are wrapped in transactNew to make sure they retry individually.

The only "load" not done inside a transaction is the EppResourceIndex, but there's no getting around that without rewriting the EppResourceInputs.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164176764
2017-08-29 15:40:41 -04:00
..
BackupModule.java Add "toTime" parameter to RestoreCommitLogsAction web form 2017-05-17 11:46:18 -04:00
BackupUtils.java Refer to Datastore everywhere correctly by its capitalized form 2017-02-17 12:12:12 -05:00
BUILD Update DeleteOldCommitLogs to only delete unreferenced logs 2017-07-12 11:03:50 -04:00
CommitLogCheckpointAction.java Change @Auth to an AutoValue, and created a set of predefined Auths 2017-08-01 16:33:10 -04:00
CommitLogCheckpointStrategy.java Refer to Datastore everywhere correctly by its capitalized form 2017-02-17 12:12:12 -05:00
DeleteOldCommitLogsAction.java Map over Key instead of actual instances when deleting old commit logs 2017-08-29 15:40:41 -04:00
ExportCommitLogDiffAction.java Change @Auth to an AutoValue, and created a set of predefined Auths 2017-08-01 16:33:10 -04:00
GcsDiffFileLister.java Deal with gaps and forks in commit history 2017-05-17 11:30:36 -04:00
package-info.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
RestoreCommitLogsAction.java Change @Auth to an AutoValue, and created a set of predefined Auths 2017-08-01 16:33:10 -04:00