Enhancements
-
[Telemetry] Add domain to
attach_default_loggermetadataAlthough this information is present in the source attribute, it’s not part of the metadata, it’s part of the attributes. And when
encode = true, it’s generated as a string, which makes it less convenient to work with. -
[Cron] Add unique cron entry identifiers to job meta
A id value is generated for each cron entry and stored in the job's meta to distinguish between different cron jobs with the same expression.
Bug Fixes
-
[Stager] Order staging query to maximize compound index usage
The core compound index couldn't be utilized by staging queries when the planner estimated a large number of hits. Changing the query to order by
scheduled_atandid, it becomes an index scan.It would still be more efficient to use a dedicated index, but OSS doesn't have any mechanisms for automatic concurrent index creation and we have to save it for later.
-
[Executor] Take measurements from the executing process
When Producer starts jobs, it calls
Executor.newin its own process, before handing it off toTask.Supervisor.async_nolinkto callExecutor.call. That means it used the Producerpid, and took measurements from that process. -
[Oban] Set
scheduledstate correctly when updating withupdate_job/3When the
scheduled_attimestamp is set duringupdate_job, the state is automatically set toscheduled. This mirrors the functionality ofinsert_job.Note that the value of the timestamp isn't considered. Setting a timestamp in the past will set the job as
scheduled. This isn't a problem in practice because the stager will change the state toavailableon the next cycle anyhow. -
[Repo] Include
:deadlock_detectedin expected errorsDeadlocks are automatically resolved by Postgres because it aborts one transaction. At that point, the retry should succeed quickly since the blocking transaction is gone.