mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-21 14:36:31 +00:00
a72497b3c4
A tick whose lease another process held returned from runLeased without running, and traceEntry still wrote `cron <name> ok`, so both processes logged the tick as run and the per-tick line could not tell which replica did the work. runLeased now says whether the tick ran, and traceEntry takes a `skipped` option that logs such a call at debug as `cron <name> skipped <ms>: lease held by another process`. Taking the lease is two statements (make sure the row exists, then the conditional UPDATE that decides the race), so it now runs inside UnitOfWork.transactional like every other multi-statement write.