Skip to content

pulse v1.6.4

Choose a tag to compare

@raphael raphael released this 02 May 01:13
80c93b1

Overview

Pulse v1.6.4 fixes a distributed pool race that could allow duplicate singleton jobs to start across replicas. A restarted or lagging replica could miss the already-running job in its local replicated-map cache after the pending dispatch guard had been cleared, then dispatch the same job key again.

Highlights

  • Atomic singleton job admission
    • dispatch now uses one Redis-side claim to check both durable running-job payloads and in-flight pending guards before a job can start.
    • stale local replicated-map state can no longer admit a duplicate dispatch for an already-running job key.
  • Owner-aware pending cleanup
    • pending dispatch guards are removed only by the dispatch attempt that created them.
    • a timed-out dispatcher cannot erase a newer dispatch guard for the same job key.
  • Strict pending guard contracts
    • malformed pending guard state now fails closed instead of being treated as stale.
    • cleanup logs malformed guard state and leaves it intact for investigation.

Validation

GitHub checks passed on PR #74:

  • ci (1.24, ubuntu-latest)
  • CodeQL
  • dependency-review
  • Analyze (go)
  • Analyze (actions)

Additional local validation before the PR:

  • go test ./pool -run '^TestJobLossDuringConcurrentWorkerCleanup$' -count=10 -timeout 120s
  • go test ./pool -count=1 -timeout 120s
  • go test -p 1 ./... -count=1 -timeout 120s
  • go test -race ./pool -count=1 -timeout 120s

Included Changes

  • 80c93b1 pool: atomically claim job dispatches (#74)
  • Changes merged from PR #74

Full Changelog: v1.6.3...v1.6.4