Skip to content

9.16.3

Choose a tag to compare

@jeremydmiller jeremydmiller released this 13 Jul 22:08
· 478 commits to master since this release
616bad3

What's Changed

Fixes

  • A disposed NpgsqlDataSource is now terminal in AdvisoryLock.TryAttainLockAsync by @jeremydmiller in #354 — fixes marten#4915

    Weasel 9.16.2 (#349) caught the disposed-pool ObjectDisposedException in TryAttainLockAsync and returned false. But in ProjectionCoordinatorBase.executeAsync, false falls into the "stop the agents, sleep LeadershipPollingTime, poll again" branch — so a disposed data source produced an unbounded churn of aborted opens, and the coordinator's catch (ObjectDisposedException) (added by #500 for exactly this state) could never fire.

    A disposed NpgsqlDataSource never comes back, so the state is terminal, and the catch now does both halves of that: it latches _disposed so a caller that keeps polling is answered from the short-circuit rather than re-opening a dead pool, and it rethrows so the coordinator's existing catch ends the leadership loop. This restores the pre-9.16.2 escape while keeping #349's actual goal — stopping the churn rather than hiding the exception.

    Both consumers of IAdvisoryLock.TryAttainLockAsync (Marten and Polecat) route through ProjectionCoordinatorBase, which has caught ObjectDisposedException since JasperFx 2.24.1.

    Diagnosed in #353 by @steve-ziegler.

Full Changelog: 9.16.2...9.16.3