Add the scheduling module
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().
This commit is contained in:
16
scheduling/scripts/run-all.sh
Executable file
16
scheduling/scripts/run-all.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
# Regenerates every file under docs/output/. Takes about three minutes: two three-replica runs of
|
||||
# 30 seconds each plus the test suite, and three JVMs need roughly ten seconds to start on a
|
||||
# small box.
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
mkdir -p docs/output
|
||||
scripts/postgres.sh start >/dev/null
|
||||
|
||||
mvn -B -q -DskipTests package
|
||||
mvn -B test 2>&1 | grep -E 'Running |Tests run:|BUILD ' > docs/output/tests.txt
|
||||
|
||||
scripts/three-replicas.sh unlocked > docs/output/three-replicas-unlocked.txt
|
||||
scripts/three-replicas.sh locked > docs/output/three-replicas-locked.txt
|
||||
|
||||
echo "regenerated:"; ls -1 docs/output
|
||||
Reference in New Issue
Block a user