v31.0
docling-project/doclingv31.0May 19, 2026by pierre-b
AI Summary
Contains database schema optimizations and fixes to prevent trigger loops, correct recurring task timing, and improve connection pool health checks.
Key Highlights
- Optimized trigger function for segment recomputation to prevent self-loops.
- Recurring tasks now correctly write and compare `timeout_after` in UTC.
- Connection pool health check now uses an isolated context to prevent premature eviction.
New Features
- Trigger optimization for contact timeline events.
- UTC time fix for HTTP dispatched recurring tasks.
- Isolated context for database pool health checks.
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.