v31.0
gorhill/uBlockv31.0May 19, 2026by pierre-b
AI Summary
This release optimizes database triggers to prevent self-loops in segment recomputation and fixes time zone handling for recurring tasks to ensure correct scheduling on non-UTC servers.
Key Highlights
- Optimized `queue_contact_for_segment_recomputation` trigger
- Fixed recurring tasks to use UTC time
- Fixed pool health check isolation to prevent context cancellation eviction
Full Release Notes
### Database Schema Changes
- Migration v31.0 updates the `queue_contact_for_segment_recomputation` trigger function on every workspace database to short-circuit when the inserted `contact_timeline` row is itself a segment membership event (`kind IN ('segment.joined', 'segment.left')`).
### Fixes
- **Fix**: `queue_contact_for_segment_recomputation` trigger no longer re-enqueues contacts when the inserted `contact_timeline` event is itself a segment membership change (`segment.joined`/`segment.left`). Removes a self-loop where every membership write re-queued the same contact.
- **Fix**: Recurring tasks dispatched via HTTP now write `timeout_after` in UTC. The column is `TIMESTAMP WITHOUT TIME ZONE` and the scheduler compares it against `time.Now().UTC()`; on non-UTC hosts the local-time value caused the task to appear "still running" for the host's UTC offset. Same fix applied to the broadcast-pause `next_run_after`.
- **Fix**: `GetWorkspaceConnection`'s pool health check now uses an isolated context for `pool.PingContext` instead of the caller's. A caller-context cancellation no longer triggers pool eviction.