QueueEntry

org.llm4s.agent.service.QueueEntry
See theQueueEntry companion object
@Experimental
final case class QueueEntry

A run queue entry, as a store reads it (design 4.55): one submitted run on a thread, durable, with the attempts made at it and, once closed, its EntryOutcome.

An entry is open until it is closed, and only an open entry is ever taken or reclaimed-proof: a closed one is kept for the ticket lifetime after closedAt, then reclaimed. While open, position is how many of the thread's open entries run before it (0: it runs next, or is running), and leaseHolder and leaseExpiresAt say which worker holds it, if one does - a lease that has expired by the store's clock may be taken over.

Value parameters

admitted

whether a run of one of attempts has committed a checkpoint on the thread - set by the store in that commit's own transaction, and kept when the checkpoint later leaves the history (a direct run's Commit.retractTurn removes it), so the input is known to be admitted even when the run-id lookup no longer finds it (AttemptPlan)

attempts

the attempts recorded, oldest first, each before it touched the thread

closedAtSeq

the number of the thread's last event when the entry closed (0 for none): every event of the entry's runs is at or below it, so following the entry stops there (RunSubmitter.follow)

maxAttempts

the most attempts the entry may make, fixed at submission

stopRequest

the stop asked of the entry's running attempt, if any (W3): a cancel, or an interrupt by a later Interrupt entry; kept until the entry closes

trace

the submitter's trace context (Submission.traceContext), which every attempt continues (attemptConfig); None when the submission named none

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

The RunConfig an attempt at the entry runs with (Stage 5 rule 4, design 4.58): as run runId - the attempt's, recorded by RunQueue.recordAttempt - for the entry's tenant, continuing the submitter's trace context (trace), so every attempt of the entry is in the submitter's trace whatever worker or machine runs it. A recover or resume of a thread whose entry has no trace continues the trace its checkpoint records.

The RunConfig an attempt at the entry runs with (Stage 5 rule 4, design 4.58): as run runId - the attempt's, recorded by RunQueue.recordAttempt - for the entry's tenant, continuing the submitter's trace context (trace), so every attempt of the entry is in the submitter's trace whatever worker or machine runs it. A recover or resume of a thread whose entry has no trace continues the trace its checkpoint records.

Attributes

def isOpen: Boolean

Whether the entry is still to run or running: it has no outcome.

Whether the entry is still to run or running: it has no outcome.

Attributes

def runIds: Set[RunId]

The RunIds of every attempt, the set the run-id lookup takes (Checkpointer.latestOfRuns).

The RunIds of every attempt, the set the run-id lookup takes (Checkpointer.latestOfRuns).

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product