v2.19.2
Enhancements
-
[Oban] Allow setting a MFA in
:get_dynamic_repoAnonymous functions don't work with OTP releases, as anonymous functions cannot be used in configuration. Now a MFA tuple can be passed instead of a fun, and the scaling guide recommends a function instead.
-
[Cron] Include configured timezone in cron job metadata
Along with the cron expression, stored as
cron_expr, the configured timezone is also recorded ascron_tzin cron job metadata. -
[Cron] Add
next_at/2andlast_at/2for cron time calculationsThis implements jumping functions for cron expressions. Rather than naively iterating through minutes, it uses the expression values to efficiently jump to the next or last cron run time.
-
[Executor] Always convert
queue_timeto native time unitThe telemetry docs state that measurements are recorded in
nativetime units. However, that hasn't been the case forqueue_timefor a while now. It usually worked anyway native and nanosecond is of the same resolution, but now it is guaranteed.
Bug Fixes
-
[Peer] Correct leadership elections for the
DolphinengineMySQL always returns the number of entries attempted, even when nothing was added. The previous match caused all nodes to believe they were the leader. This uses a secondary query within the same transaction to detect if the current instance is the leader.
-
[Reindexer] Drop invalid indexes concurrently when reindexing.
The
DROP INDEXquery would lock the whole table with anACCESS EXCLUSIVElock and could cause queries to fail unexpectedly. -
[Testing] Use
Ecto.Type.cast/2for backward compatibilityThe
cast!/2function wasn't added until Ecto 3.12. This reverts time casting to usecast/2for compatibility with earlier Ecto versions. -
[Worker] Validate that the
uniqueoption isn't an empty list.An empty list was accepted at compile time, but wouldn't be valid later at runtime. Now the two validations match for greater parity.