4.9.2 fixes five problems found in 4.9: jobs failing to build under PropertyMismatchBehavior.Throw, the dashboard resetting a Blazor host's circuit settings, store-attached dashboards that could not use the application's data source, a DeleteJob that failed when a trigger of the job finished at the same moment, and an HTTP API whose OpenAPI document failed under native AOT or trimming. It also makes the cluster-observer switch public for admin processes. There is no schema change, and the only API change is an addition.
Fixed
- A job built with
PropertyMismatchBehavior.Throwno longer fails on Quartz's own data keys (#4532, from #4515).PropertySettingJobFactorytried to set a job property for everyQRTZ_key Quartz writes into a firing's data, and withThroweach one failed the firing. Those are a manual run's mark, a job input, a backfill's slot, a recovered firing's original trigger, and the trace context thatPropagateTraceContext, on by default, leaves on a trigger scheduled inside an activity. So every Run now,TriggerJob, backfill, recoveredRequestRecoveryjob and job given an input (UsingInput,TriggerJobAndWait<TInput>) failed to build, and so did every firing of a trigger scheduled inside a trace. Keys startingQRTZ_are now passed over. - Adding the dashboard keeps a Blazor Server host's circuit settings (#4525, fixes #4521).
AddQuartzDashboard()re-ran Blazor's server registration, which put the host's tuned options for its circuit hub, such asClientTimeoutIntervalandMaximumReceiveMessageSize, back to their defaults. Its ownAddSignalR()also setWebSocketOptions.KeepAliveIntervalback to zero. The dashboard now registers Blazor only when the host has not, whichever comes first, and leaves the keep-alive alone. A host with SignalR but no Blazor Server should configure the keep-alive afterAddQuartzDashboard(). - A store-attached dashboard can use the data source the application registered (#4523, fixes #4518).
AttachStore's discovery probe and its windows built their own containers, so a recipe written as the nodes write it threw on every discovery round, and no window opened. The recipes affected usedDataSourceServiceKey,DataSourceFactory,UseRegisteredDataSourceorConnectionStringName. Those now resolve against the application's own container, and so does a factory that reads the application's options. Runtime tenants added withISchedulerRuntime.Addget the same. A data source taken from the application is never disposed by the dashboard. DeleteJobno longer fails when a trigger of the job finishes while it deletes (#4531, reported by @GaryBesta as #322 in 2016).DeleteJoblists a job's triggers, then unschedules each, and threwSchedulerException"Unable to unschedule trigger … while deleting job …" when one had gone in between: most often right afterTriggerJob, whose one run finished first. The trigger is gone, which is what the delete wants, so the delete now goes on.- The HTTP API's OpenAPI document generates under native AOT and trimming (#4535, fixes #4528, reported by @wlingxiao). With reflection-based JSON off, generating the document threw
NotSupportedExceptionforQuartz.AspNetCore.HttpApi.OpenApi.Calendar, the first of the internal OpenAPI types Quartz's endpoints describe themselves with that had no generated metadata; the trigger listing'sstatefilter had none either. The types are internal, so an application could not add the metadata itself. Quartz now adds that metadata to the application's JSON options, behind reflection, so an application with reflection on answers as before.
Added
AdoJobStoreOptions.ClusterObserveris public, withstore.UseClusterObserver()and the flat keyquartz.jobStore.clusterObserver(#4524, fixes #4519). An admin process that shares the cluster's store and scheduler name can say it only observes: itsStart()is refused before recovery or check-in, and it never appears in the node listing.ZeroSizeThreadPoolalone does not stop a start from running recovery. See Admin process in the external-leader how-to.
Compatibility
- No schema change and no migration. 4.9.0, 4.9.1 and 4.9.2 nodes run side by side in one cluster.
- API additions only:
AdoJobStoreOptions.ClusterObserverandClusterObserverExtensions.UseClusterObserver. - Behaviour a 4.9.1 application may notice:
DeleteJobreturns where it threw, and returnsfalsefor a non-durable job its store already removed with that trigger.PropertyMismatchBehavior.Warnno longer logs forQRTZ_keys.- A Blazor Server host's circuit, hub and WebSocket keep-alive settings stand beside the dashboard.
- The
QRTZ_fix works per node. UnderThrow, a manual run or a traced trigger that fires on a 4.9.0 or 4.9.1 node still fails until every node runs 4.9.2. - An admin process rolled back to 4.9.1 is no observer. 4.9.1 refuses the flat key
quartz.jobStore.clusterObserver, and ignoresQuartz:JobStore:ClusterObserver, so that process would start and run recovery. - The 4.9.2 rows of the migration guide's Upgrading from 4.8 to 4.9 list each change.
The dashboard fix (#4526) is on the 3.x branch, and the DeleteJob fix goes there too, for the next 3.22.x.
What's Changed
Other changes
- 4.9.2 brings the data-source, cluster-observer, Blazor-host, QRTZ_ key, DeleteJob and OpenAPI-under-AOT fixes to the 4.9.x line by @lahma in #4532
Full Changelog: v4.9.1...v4.9.2