Skip to content

PHP SDK 3.13.0

Choose a tag to compare

@rmcdaniel rmcdaniel released this 11 Nov 18:04
dfb06e6

PHP SDK 3.13.0 adds worker recovery from stale registration and a schedule-origin accessor. It also fixes two cases where the SDK hid a problem from callers.

Changed

  • Worker::run() now recovers from stale_worker_registration instead of stopping (#378, #357). A host pause, long GC stop or network partition can outlast the Server's registration-freshness window. When that happens, the worker drops every task the fenced incarnation held without completing it, registers again and keeps polling, and the Server redelivers the dropped work. Repeated recoveries back off up to 60 seconds. Each one logs worker.reregistered and increments durable_workflow_worker_reregistrations. Pass stopOnStaleRegistration: true to keep the old stop behavior.

Added

  • WorkflowContext::scheduleOrigin() returns the schedule id, occurrence time and trigger number of the schedule fire that started a run, or null for an ordinary start (#382). Use it to pick a time window, including for backfills. The value is identical on replay.

Fixed

  • Upgrade note: when a waitFor: 'completed' update wait ends before the update finishes, Client::updateWorkflow() and WorkflowHandle::update() now throw UpdateStillPending (#383). Before, they returned the Server receipt as if it were the update's result. The exception carries updateId, requestId, workflowId, runId and updateStatus. Call the update again with $pending->requestId to keep waiting; that doesn't apply the update twice. waitFor: 'accepted' and updateWorkflowReceipt() are unchanged.
  • A local activity with more retries than backoff_seconds entries now repeats the last delay instead of retrying immediately, matching server-scheduled activities (#379).

No protocol or Server requirement changes. Tested against native Server 3.4.0.