effect-tea-persistent
    Preparing search index...

    The options of launch, each with a default: a launch with none runs on one process with the tables it creates. Only an option left out, or a field of it left out, takes the default. An option or a field given null is the launcher's defect, as any value an option does not take is (decision 0208).

    interface Options {
        callers?: Readonly<{ messages: number }>;
        capacity?: Readonly<{ entities: number | "unbounded" }>;
        drain?: Readonly<{ millis: number }>;
        log?: Readonly<{ partitions: number }>;
        passivate?: Readonly<{ millis: number }>;
        renames?: Readonly<Record<string, string>>;
        retry?: Readonly<{ millis: number }>;
        sweep?: Readonly<{ millis: number; prune?: false }> | "none";
        tables?: "create" | "existing";
        warn?: Readonly<{ characters: number }>;
    }
    Index
    callers?: Readonly<{ messages: number }>

    How many callers' messages an entity holds before a send is answered Full: the messages of send offered to it and not yet applied, whose callers wait. A positive integer, 4096 by default. The first refusal of an activation logs a warning. An operation of another entity is never answered Full: it sends again after retry (decision 0147). On Cluster the bound does not hold: a caller's message waits in Cluster's table, and Cluster's mailboxCapacity bounds the messages in memory (decision 0165).

    capacity?: Readonly<{ entities: number | "unbounded" }>

    How many entities the process holds, of every program, before it unloads the least recently used of those with nothing to do and no timer due, without waiting for their passivation. Another is never unloaded for it, so the process holds more only while what it holds is busy. A positive integer, 10 000 by default, which is Effect Cluster's maxResidentEntities; 'unbounded' leaves time alone to unload (decisions 0076, 0078, 0151).

    drain?: Readonly<{ millis: number }>

    How long a planned stop waits for the at-most-once operations under way, once the scope the runtime was launched in closes. Meanwhile no caller's message, creation, resume or discard is taken, the timers stop, and so do the operations that run again at the next activation. The at-most-once operations and the steps of their completions run on, and an at-most-once operation such a step starts runs too. Whatever is under way after millis stops as in a crash. None by default: the scope's closing is a crash (decision 0119).

    log?: Readonly<{ partitions: number }>

    How many partitions the log has: a positive integer, 300 by default. The first launch stores it in the database, and a launch given another number fails, since a change would move entities between partitions, and every consumer's cursors with them (decision 0137).

    passivate?: Readonly<{ millis: number }>

    How long an entity stays loaded with no event coming for it. The wait starts again at every event, and when it runs out the entity is unloaded, or waits again if it still has something to do (decision 0029). A positive integer, 30 000 by default (decision 0251).

    renames?: Readonly<Record<string, string>>

    The programs renamed, from each old name to its new one. The launch moves what is stored under each old name to the new one in one transaction, before any deploy, and an entity keeps the idempotency keys of its work. A rename whose old name holds nothing moves nothing, so it may stay here for as long as a database of the old name may be launched. One onto a name that holds an entity, a head of the log or a consumer dies. So do an empty name, a name renamed to itself, and a name both renamed and the new name of another, before the database is held. Two names may be renamed to one, as a program renamed twice is: { a: 'c', b: 'c' }. A deploy of a name renamed dies (decisions 0156, 0176). On Cluster the old name is marked renamed, so that no runner of the old code steps it again, and the new program's door is registered under each old name too, so that a request Cluster saved under the old name is delivered to the new program (decision 0176).

    retry?: Readonly<{ millis: number }>

    How long a send or a create from another entity waits before sending again to a receiver that crashed on it (decision 0046). A suspended receiver is waited for until it is resumed, and a program not deployed yet until it is: neither is looked at again on a clock (decision 0063). A positive integer, 10 by default (decision 0251).

    sweep?: Readonly<{ millis: number; prune?: false }> | "none"

    How often the runtime sweeps each program deployed: every millis, it runs expire, then prune unless prune is false. millis is a positive integer, 300 000 by default. 'none' sweeps nothing, and leaves expire and prune to an operator. A sweep that fails logs a warning with its cause, and the next one runs at the next interval. A prune drops whole a topic no consumer is stored for, so a deployment that keeps the history of a topic declares its consumer before the topic's first step, or sweeps with prune: false. On Cluster one runner sweeps a program, the one that holds the sweep's singleton, by its own option (decision 0245).

    tables?: "create" | "existing"

    What the launch does with the tables. 'create', the default, runs the migrations of the tables not yet recorded, once the database is held (decision 0216). 'existing' runs none, for a role of PostgreSQL that may only read and write rows. That role's launch dies where a table is missing, and an operator runs createTables under the tables' owner before each launch of a new release of the library. On Cluster sharding creates the tables whatever this says (decision 0191).

    warn?: Readonly<{ characters: number }>

    How many characters a step may write of the state and of the projection, in the read model and in each topic of the outbox, before the runtime logs a warning, once per activation of the entity. A non-negative integer, 262 144 by default. Nothing is refused for its size: the program splits a large state (decisions 0135, 0138, 0208).