DispatchTaskStore implements [exec.DispatchTaskStore] on top of a [persis.Collection]. Record IDs use "pending/" and "claims/" prefixes so a file collection rooted at the distributed directory uses the existing on-disk layout directly.
| 50 | // file collection rooted at the distributed directory uses the existing |
| 51 | // on-disk layout directly. |
| 52 | type DispatchTaskStore struct { |
| 53 | col persis.Collection |
| 54 | reservationTTL time.Duration |
| 55 | admissionLeaseStore exec.DAGRunLeaseStore |
| 56 | admissionActiveRunStore exec.ActiveDistributedRunStore |
| 57 | lastReservationCleanupAt time.Time |
| 58 | index *dispatchTaskIndex |
| 59 | // mu serializes the in-process recycle+scan+claim sequence; |
| 60 | // per-record CompareAndDelete provides cross-process safety. |
| 61 | mu sync.Mutex |
| 62 | } |
| 63 | |
| 64 | type dispatchTaskIndex struct { |
| 65 | pending map[string]dispatchTaskIndexEntry |
nothing calls this directly
no outgoing calls
no test coverage detected