mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-25 20:15:37 +02:00
The idx_one_pending_task_per_issue index only allowed one pending task per issue across all agents, causing different agents' queued/dispatched tasks to block each other. This mismatched the code-level dedup which checks per (issue_id, agent_id). Replace with idx_one_pending_task_per_issue_agent on (issue_id, agent_id) so each agent can independently have one pending task. Fixes MUL-495 Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6 lines
192 B
SQL
6 lines
192 B
SQL
DROP INDEX IF EXISTS idx_one_pending_task_per_issue_agent;
|
|
|
|
CREATE UNIQUE INDEX idx_one_pending_task_per_issue
|
|
ON agent_task_queue (issue_id)
|
|
WHERE status IN ('queued', 'dispatched');
|