Description
In dotCMS/src/main/java/com/dotmarketing/init/DotInitScheduler.java, inside addServerHeartbeatJob() (line ~584), the trailing comment on the server-heartbeat interval contradicts the value it annotates:
final int delaySeconds = Config.getIntProperty("SERVER_HEARTBEAT_RUN_EVERY_SECONDS", 60); // runs every 5 seconds.
The default is 60 seconds, not 5.
The comment was wrong when it was written — it is not a default that changed and left the comment behind. Commit 999036092e (#19291, unifying the 3 quartz schedulers, Oct 2020) created this block by adapting the SystemEventsJob block ~150 lines above in the same file:
final int delaySeconds = Config.getIntProperty("SYSTEM_EVENTS_DELAY_SECONDS", 5); // runs every 5 seconds.
That one is accurate — it really does default to 5. The heartbeat copy changed the property name and the default to 60 and kept the comment verbatim.
The cadence itself never changed either. Before that commit the heartbeat was a Quartz CronTrigger on HEARTBEAT_CRON_EXPRESSION, defaulted to 0 0/1 * * * ? in dotcms-config-cluster.properties — once a minute. The 60-second fixed delay preserved that; only the scheduling mechanism changed.
Why it is worth correcting: this interval bounds how quickly a node notices a cluster membership change and how quickly a failed cache-transport rewire is retried. A reader trusting the comment would be off by 12x when reasoning about cluster convergence or detection latency.
Found while tracing the heartbeat cadence for #36803 / #36864.
Acceptance Criteria
Priority
Low
Additional Context
Comment-only change, already implemented in PR #37014. No behaviour change, no test impact, nothing for QA to verify — labelled QA : Not Needed. Needs only a quick review and merge.
Description
In
dotCMS/src/main/java/com/dotmarketing/init/DotInitScheduler.java, insideaddServerHeartbeatJob()(line ~584), the trailing comment on the server-heartbeat interval contradicts the value it annotates:The default is 60 seconds, not 5.
The comment was wrong when it was written — it is not a default that changed and left the comment behind. Commit
999036092e(#19291, unifying the 3 quartz schedulers, Oct 2020) created this block by adapting theSystemEventsJobblock ~150 lines above in the same file:That one is accurate — it really does default to 5. The heartbeat copy changed the property name and the default to 60 and kept the comment verbatim.
The cadence itself never changed either. Before that commit the heartbeat was a Quartz
CronTriggeronHEARTBEAT_CRON_EXPRESSION, defaulted to0 0/1 * * * ?indotcms-config-cluster.properties— once a minute. The 60-second fixed delay preserved that; only the scheduling mechanism changed.Why it is worth correcting: this interval bounds how quickly a node notices a cluster membership change and how quickly a failed cache-transport rewire is retried. A reader trusting the comment would be off by 12x when reasoning about cluster convergence or detection latency.
Found while tracing the heartbeat cadence for #36803 / #36864.
Acceptance Criteria
// runs every 5 seconds.comment is removed fromaddServerHeartbeatJob().SERVER_HEARTBEAT_INITIAL_DELAY_SECONDSandSERVER_HEARTBEAT_RUN_EVERY_SECONDSdefault to one minute.// runs every 5 seconds.comment onSYSTEM_EVENTS_DELAY_SECONDSis left untouched.Priority
Low
Additional Context
Comment-only change, already implemented in PR #37014. No behaviour change, no test impact, nothing for QA to verify — labelled
QA : Not Needed. Needs only a quick review and merge.