google-nomulus/javatests/google/registry
guyben aee4f7acc2 Remove queueing from Lock
It was buggy (didn't work) and was never actually used.

Why never actually used: for it to be used executeWithLock has to be called
with different requesters on the same lockId. That never happend in the code.

How it was buggy: Logically, the queue is deleted on release of the lock (meaning it was
meaningless the only time it mattered - when the lock isn't taken). In
addition, a different bug meant that having items in the queue prevented the
lock from being released forcing all other tasks to have to wait for lock
timeout even if the task that acquired the lock is long done.

Alternative: fix the queue. This would mean we don't want to delete the lock on release (since we want to keep the queue). Instead, we resave the same lock with expiration date being START_OF_TIME. In addition - we need to fix the .equals used to determine if the lock the same as the acquired lock - instead use some isSame function that ignores the queue.

Note: the queue is dangerous! An item (calling class / action) in the first place of a queue means no other calling class can get that lock. Everything is waiting for the first calling class to be re-run - but that might take a long time (depending on that action's rerun policy) and even might never happen (if for some reason that action decided it was no longer needed without acquiring the lock) - causing all other actions to stall forever!

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163705463
2017-08-01 17:06:20 -04:00
..
backup Update DeleteOldCommitLogs to only delete unreferenced logs 2017-07-12 11:03:50 -04:00
batch Add metrics for async batch operation processing 2017-06-05 18:17:09 -04:00
bigquery Remove some unnecessary uses of MockitoJUnitRunner, which is discouraged 2017-04-26 10:42:43 -04:00
builddefs Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
config Remove unnecessary line to load configs 2017-02-27 11:07:40 -05:00
cron Add response information to TldFanoutAction 2017-04-10 13:32:41 -04:00
dns Add logging statement for # of tasks in DNS queue 2017-08-01 17:02:00 -04:00
export Remove queueing from Lock 2017-08-01 17:06:20 -04:00
flows Make Registrar load methods return Optionals instead of Nullables 2017-08-01 16:58:59 -04:00
groups Remove some unnecessary uses of MockitoJUnitRunner, which is discouraged 2017-04-26 10:47:13 -04:00
keyring/kms Update cloudkms_java with the non-beta version 2017-06-05 18:17:09 -04:00
mapreduce/inputs Fix 'Optional.absent()' to be 'Optional.<DateTime>absent()' 2017-07-10 11:14:43 -04:00
model Remove queueing from Lock 2017-08-01 17:06:20 -04:00
module Change @Auth to an AutoValue, and created a set of predefined Auths 2017-08-01 16:33:10 -04:00
monitoring Add a Fibonacci fitter for metrics bucketing 2017-05-23 17:22:49 -04:00
pricing Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
rdap RDAP: Allow domain and nameserver queries with no initial string under certain circumstances 2017-07-10 11:16:03 -04:00
rde Remove queueing from Lock 2017-08-01 17:06:20 -04:00
reporting Upgrade activity reporting queries to StandardSQL 2017-08-01 16:56:12 -04:00
request Fix Optinal.absent() to Optional.<AuthResult>absent() 2017-08-01 16:34:32 -04:00
security Remove some unnecessary uses of MockitoJUnitRunner, which is discouraged 2017-04-26 10:45:45 -04:00
server Make Registrar load methods return Optionals instead of Nullables 2017-08-01 16:58:59 -04:00
storage/drive Remove some unnecessary uses of MockitoJUnitRunner, which is discouraged 2017-04-26 10:45:45 -04:00
testing Make Registrar load methods return Optionals instead of Nullables 2017-08-01 16:58:59 -04:00
tldconfig/idn Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
tmch Make Registrar load methods return Optionals instead of Nullables 2017-08-01 16:58:59 -04:00
tools Make Registrar load methods return Optionals instead of Nullables 2017-08-01 16:58:59 -04:00
ui Make Registrar load methods return Optionals instead of Nullables 2017-08-01 16:58:59 -04:00
util Perform some minor test cleanup 2017-08-01 16:20:49 -04:00
whois Make Registrar load methods return Optionals instead of Nullables 2017-08-01 16:58:59 -04:00
xjc Add mapper to import domains from RDE deposits 2017-02-06 16:46:46 -05:00
xml Update copyright year on all license headers 2017-02-02 16:27:22 -05:00