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:
15
scheduling/Dockerfile
Normal file
15
scheduling/Dockerfile
Normal file
@@ -0,0 +1,15 @@
|
||||
# Used only by docker-compose.yml. The committed transcripts under docs/output/ were produced
|
||||
# without Docker, by scripts/three-replicas.sh against the PostgreSQL that scripts/postgres.sh
|
||||
# unpacks into target/.
|
||||
FROM eclipse-temurin:25-jdk AS build
|
||||
WORKDIR /src
|
||||
COPY pom.xml .
|
||||
RUN --mount=type=cache,target=/root/.m2 \
|
||||
apt-get update && apt-get install -y --no-install-recommends maven && \
|
||||
mvn -B -q dependency:go-offline
|
||||
COPY src ./src
|
||||
RUN --mount=type=cache,target=/root/.m2 mvn -B -q -DskipTests package
|
||||
|
||||
FROM eclipse-temurin:25-jre
|
||||
COPY --from=build /src/target/scheduling-1.0.jar /app.jar
|
||||
ENTRYPOINT ["java", "-jar", "/app.jar"]
|
||||
Reference in New Issue
Block a user