Retry account updates on LockFailureException
If an account update fails with LockFailureException (because the same account was concurrently updated by another thread) we now retry the account update. In future AccountsUpdate should allow to update an account and its external IDs atomically. For external ID updates there is a higher chance of lock failures since the external IDs of all users are stored in a single notes branch. Hence when AccountsUpdates takes to also update external IDs it gets important to retry account updates that failed due to lock failure. So this change is a preparation to support updating accounts and external IDs atomically in future. Change-Id: I2bc6b4cceb111855f48d02a68690003992b3dc53 Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
@@ -66,7 +66,7 @@ public class PutName implements RestModifyView<AccountResource, NameInput> {
|
||||
|
||||
public Response<String> apply(IdentifiedUser user, NameInput input)
|
||||
throws MethodNotAllowedException, ResourceNotFoundException, IOException,
|
||||
ConfigInvalidException {
|
||||
ConfigInvalidException, OrmException {
|
||||
if (input == null) {
|
||||
input = new NameInput();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user