Repository navigation
9.43.0
One change: the SQL Server advisory lock monitor that 9.42 added becomes configurable.
Full upgrade guide: https://weasel.jasperfx.net/release-9-43
Nothing in this release is a breaking change, and nothing behaves differently unless you ask it to. The new settings default to 9.42.0's hard-coded values exactly, and the existing three-argument constructor keeps its signature.
SQL Server advisory lock monitor is configurable: #700 / #701
var advisoryLock = new AdvisoryLock(source, logger, databaseName, new SqlServerAdvisoryLockOptions
{
MonitoringInterval = 10.Seconds(), // default 5s
ProbeTimeout = 3.Seconds() // default 5s; keep it under the interval
});⚠️ A non-positive or infiniteMonitoringIntervalturns the monitor off, which re-opens 9.42's split brain (#695): a node that loses its session goes on reporting locks the server has already released. The probe costs nothing while no locks are held, so opting out only saves one parked timer per database.ProbeTimeoutbounds shutdown as well as the query, because disposal waits behind an in-flight probe. Sub-second values round up to one second, sinceCommandTimeout = 0would mean "wait forever".- There is no
ReleaseTimeout, unlike the PostgreSQL lock. A pooledSqlConnectionkeeps its session and itssp_getapplockholds when it closes, so a release abandoned on a deadline would strand the lock against the next node. This was measured and is pinned by tests.
Polecat users set this through Polecat's own options (JasperFx/polecat#749), not by constructing the lock directly.
New public API
Weasel.SqlServer.SqlServerAdvisoryLockOptionsAdvisoryLock(Func<SqlConnection>, ILogger, string, SqlServerAdvisoryLockOptions)