Three replicas of one application against one PostgreSQL database, proving duplicate @Scheduled execution and then removing it with ShedLock: 24 executions where 8 were due, then 7 for 7 ticks. Also measured: @SchedulerLock without @EnableSchedulerLock does nothing and warns about nothing; spring.task.scheduling.pool.size=1 does not starve a fixedRate job but delays it and fires 35 of 40 executions in a burst; and a node whose clock is 40 seconds fast takes a live lock unless the provider uses usingDbTime().
38 lines
983 B
Plaintext
38 lines
983 B
Plaintext
profile=locked replicas=3 run-for=30s job rate=3s job duration=PT0.2S replica-3 clock skew=0s
|
|
|
|
-- every execution, in order --
|
|
instance_id | started_at
|
|
-------------+--------------
|
|
replica-2 | 22:49:29.233
|
|
replica-3 | 22:49:31.931
|
|
replica-3 | 22:49:34.925
|
|
replica-3 | 22:49:37.934
|
|
replica-3 | 22:49:40.934
|
|
replica-3 | 22:49:43.925
|
|
replica-3 | 22:49:46.934
|
|
(7 rows)
|
|
|
|
-- executions per replica --
|
|
instance_id | count
|
|
-------------+-------
|
|
replica-2 | 1
|
|
replica-3 | 6
|
|
(2 rows)
|
|
|
|
-- pairs of executions that overlapped (a second replica started while the first was still working) --
|
|
overlapping_pairs
|
|
-------------------
|
|
0
|
|
(1 row)
|
|
|
|
first | first_at | second | second_at
|
|
-------+----------+--------+-----------
|
|
(0 rows)
|
|
|
|
-- the lock row --
|
|
name | locked_by | locked_at | lock_until
|
|
---------------+-----------+--------------+--------------
|
|
nightlyReport | unknown | 17:19:46.921 | 17:19:47.921
|
|
(1 row)
|
|
|