Skip to content

1.3.1

Choose a tag to compare

@msx752 msx752 released this 12 Nov 10:35
d556dee

1.3.1 fixes the last known way a code-defined cron could run twice, two faults in editing chain children, and three smaller ones. No database migration for EF Core, no change of the MongoDB collections, no new Redis keys. Please read Behaviour changes before deploying.

Fixed

Code-defined crons (#92)

  • Replicas that start together no longer create the same cron twice. The row the seed inserts gets an id made from the function name, the same on every node, on EF Core, MongoDB and Redis. Rows that exist keep their ids.
  • Copies made by earlier versions are removed at startup. Of the rows that carry the seed's marker for a function, the oldest is kept; the others are deleted with their occurrences, and a Warning names the function and the number removed. A cron added through the API or the dashboard, and a seeded cron edited on the dashboard, are not touched.

Chain children

  • Editing a child no longer takes it out of its chain (#85). UpdateAsync and the dashboard edit keep the parent of a stored child, and its run condition when the update carries none. Before, on EF Core, MongoDB and the in-memory store the child became a job of its own and ran at its time whatever its parent did.
  • A child without a time of its own can be edited and stay that way (#85). The dashboard dialog no longer asks for a time for such a child, and shows its run condition.
  • A child whose function is not registered gets a final status (#82). It ends Failed with a message that names the function, and its own children follow that outcome. Before, it was left Idle and nothing reported it.

Scheduler

  • A cancelled call no longer queues its job into a full queue (#86). QueueAsync with a token cancelled while it waited for room could return without an exception and add the job anyway.
  • The restart timer does nothing after its manager is disposed (#77). A callback already queued at the stop could still ask for a restart.

Behaviour changes to check before upgrading

  • Stored copies of a seeded cron are deleted at the first start, with their occurrence history. Only rows with InitIdentifier = "MemoryTicker_Seeded_" + function count, and one of them always stays.
  • A chain child without a registered function now ends Failed where it stayed Idle. Filters and alerts on Failed see these rows.
  • UpdateAsync keeps ParentId of a stored child even when the update names another parent or none. To move a child, delete it and add a new job.
  • UpdateAsync without an ExecutionTime now succeeds for a stored child that has no time. For every other job it is refused as before.
  • Dashboard: "Execute immediately" is no longer offered when a stored job is edited (the update refused it); it is still offered for a new job and a copy.

Upgrade

From 1.3.0: no step. Nodes of 1.3.0 and 1.3.1 can run together; a 1.3.0 node that starts together with another node can still insert a copy of a seeded cron, and the next start of a 1.3.1 node removes it.

Known limits

Unchanged from 1.3.0, except the entry on code-defined crons, which is fixed:

  • An inline chain child can be left Idle and not run in the cases listed for 1.3.0 (#84).
  • The start of an inline child by its parent's run is not a claim (#83).
  • At-least-once: a job whose process ended before its lost outcome was stored can run again.
  • Redis: a node that alone could not reach Redis for about two heartbeat TTLs has its running jobs released (#46).
  • A seeded cron whose function was changed keeps its id. If a new function gets that name, its cron is seeded under a random id, and that one start has no guard against a second node.

What's Changed

  • Start the queued work on the calling thread in the hand-over tests by @msx752 in #120
  • Do nothing in the restart timer after its manager is disposed by @msx752 in #121
  • Give a chain child without a registered function a final status by @msx752 in #122
  • Keep a chain child in its chain when it is edited by @msx752 in #123
  • EF Core: seed a code-defined cron once when nodes start together by @msx752 in #124
  • Do not queue a cancelled caller's job into a full queue by @msx752 in #125
  • MongoDB: seed a code-defined cron once when nodes start together by @msx752 in #126
  • Redis: seed a code-defined cron once when nodes start together by @msx752 in #127
  • EF Core: remove the stored copies of a seeded cron at startup by @msx752 in #128
  • MongoDB, Redis: remove the stored copies of a seeded cron at startup by @msx752 in #129
  • Let a chain child without a time be edited without getting one by @msx752 in #130
  • Add a container scenario for nodes that seed a cron together by @msx752 in #131
  • Release 1.3.1 by @msx752 in #132

Full Changelog: v1.3.0...v1.3.1