github HangfireIO/Hangfire v1.7.0-rc1
1.7.0-rc1

latest releases: v1.8.15, v1.8.14, v1.8.13...
pre-release5 years ago

Release Notes

This is the first release candidate of version 1.7 that adds a lot of new features and improvements and allows rolling upgrades from version 1.6.X and below. Detailed migration guide will be posted in the documentation next week, but the point of this release is to disable by default all the changes that are incompatible with 1.6 installations.

Known issues

  • Due to the bug in the CoreBackgroundJobPerformer class, there's a race condition that leads to deadlocks when running asynchronous job methods, when ConfigureAwait(false) method is called inside. This will be fixed in 1.7.0-rc2, and as a workaround, set the BackgroundJobServerOptions.TaskScheduler property to TaskScheduler.Default for your processing servers.
  • SQL Server 2014 is required for the Hangfire.SqlServer package to properly run the migration and execute CountersAggregator process. The required version will be lowered back to SQL Server 2008 R2 in 1.7.0-rc2.

Upgrading from beta versions

If you are upgrading from 1.7.0 betas, upgrade all the servers first to the newest rc1 version and only then use add the following configuration lines to turn on the new features that were disabled by default in this release candidate. Please note that CompatibilityLevel.Version_170 contains some changes that your existing 1.7.0-beta servers may not understand.

GlobalConfiguration.Configuration
    .SetDataCompatibilityLevel(CompatibilityLevel.Version_170) // Compact data representation
    .UseSimpleAssemblyNameTypeSerializer() // Compact type serialization format

If you are using SQL Server as a job storage, set the following settings if you were using 1.7.0 betas just after updating the package. These settings are the same that were enabled by default for beta versions, so your existing servers are compatible with them.

    .UseSqlServerStorage("connection_string", new SqlServerStorageOptions
    {
        CommandBatchMaxTimeout = TimeSpan.FromMinutes(5)
        SlidingInvisibilityTimeout = TimeSpan.FromMinutes(5),
        QueuePollInterval = TimeSpan.Zero, // Set only when using SlidingInvisibilityTimeout
        DisableGlobalLocks = true, // Set only if `Schema 6` migration is applied
        UsePageLocksOnDequeue = true // Set only if `Schema 6` migration is applied
    })

Hangfire.Core

  • AddedIGlobalConfiguration.SetDataCompatibilityLevel to enable rolling upgrades from version 1.6.
  • AddedIGlobalConfiguration.UseRecommendedSerializerSettings method for new installations.
  • Added – Assemblies now loaded automatically when resolving a type when using default type resolver.
  • Added – Custom TaskScheduler can now be specified in BackgroundJobServerOptions for workers.
  • AddedIdempotentCompletionAttribute filter to enforce strict order for continuations.
  • AddedIBackgroundJobClient.ContinueJobWith methods to replace ContinueWith ones in future for clarity.
  • AddedJobStorage.LinearizableReads virtual property to avoid unnecessary waits in state changer.
  • Changed – Split serializer setting to Internal and User scopes to isolate them (Version_170 Switch).
  • Changed – Don't allow to affect internal serialization even by JsonConvert.DefaultSettings (Version_170 Switch).
  • Changed – Share the same type binder between Hangfire itself and Newtonsoft.Json (Version_170 Switch).
  • Changed – Use more compact representation of dates when using SerializeDateTime (Version_170 Switch).
  • Changed – Stop using special case for DateTime argument serialization (Version_170 Switch).
  • Changed – Don't serialize unused AwaitingState.Expiration field (Version_170 Switch).
  • Changed – Use custom SynchronizationContext for async methods to run their continuations on worker thread.
  • Changed – Specify parameter type when serializing arguments to allow using TypeNameHandling.Auto option.
  • Changed – Use case sensitive search when resolving a type as by default in .NET.
  • Changed – Make SucceededState constructor public to allow state serialization.
  • Fixed – Worker now logs an error, when all the state change attempts failed due to an exception.
  • Fixed – Ensure RecurringJobScheduler doesn't go into infinite loop when there's server of an older version.
  • Fixed – Implement BackgroundTaskScheduler.MaximumConcurrencyLevel property.
  • Fixed – Dashboard renderer for AwaitingState displays Option property as string again.
  • Fixed – Don't serialize arguments multiple times when showing job details in dashboard.
  • FixedDateTimeOffset conversion error when it was serialized with TypeConverter.
  • Fixed – Remove duplicate of argument deserialization code for obsolete Job class methods.
  • Fixed – Decorate all the exceptions with the SerializableAttribute.
  • Project – Add DataCompatibilityRangeFact and DataCompatibilityRangeTheory classes for compatibility checks.
  • Project – Reduce test execution time by removing unnecessary waits.
  • Ported – Merged updates from version 1.6.23.

Hangfire.AspNetCore

  • Changed – Remove internal service registrations that are inconsistent with server options.
  • Ported – Merged updates from version 1.6.23.

Hangfire.SqlServer

  • AddedSqlServerStorageOptions.EnableHeavyMigrations switch to automatically install even heavy migrations.
  • AddedSchema 7 migration to fix the IX_HangFire_Set_Score index to include the Key column.
  • AddedSqlServerStorageOptions.DisableGlobalLocks property to avoid custom locking scheme.
  • AddedSqlServerStorageOptions.UsePageLocksOnDequeue property to use less CPU consuming fetch.
  • ChangedSchema 6 migration is disabled by default for existing installations, because it may take too long.
  • Changed – Don't throw an exception when using automatic migrations and current schema is newer than expected.
  • Changed – Store arguments in the corresponding column in SQL Server again.
  • Changed – Continue to use global locks by default in SQL Server storage.
  • Changed – Bring ExpirationManager and CountersAggregator to their previous state.
  • Changed – Monitoring API doesn't check state data to see state transition time.
  • Changed – Update CountersAggregator to use clustered key for temp table.
  • Fixed – Avoid unnecessary waits in state changer when job was already expired.
  • Fixed – Cannot resolve the collation conflict in CountersAggregator.
  • Ported – Merged updates from version 1.6.23.

Don't miss a new Hangfire release

NewReleases is sending notifications on new releases.