@framers/agentos-ext-account-sources 0.9.2 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -9
- package/dist/sync/AccountSourceSync.d.ts +38 -10
- package/dist/sync/AccountSourceSync.d.ts.map +1 -1
- package/dist/sync/AccountSourceSync.js +48 -6
- package/dist/sync/AccountSourceSync.js.map +1 -1
- package/dist/sync/SourceQuota.d.ts +16 -5
- package/dist/sync/SourceQuota.d.ts.map +1 -1
- package/dist/sync/SourceQuota.js +62 -16
- package/dist/sync/SourceQuota.js.map +1 -1
- package/dist/sync/SqlAccountSourceSyncStore.d.ts +39 -10
- package/dist/sync/SqlAccountSourceSyncStore.d.ts.map +1 -1
- package/dist/sync/SqlAccountSourceSyncStore.js +72 -16
- package/dist/sync/SqlAccountSourceSyncStore.js.map +1 -1
- package/dist/sync/state.d.ts +8 -1
- package/dist/sync/state.d.ts.map +1 -1
- package/dist/sync/state.js +11 -2
- package/dist/sync/state.js.map +1 -1
- package/dist/sync/types.d.ts +6 -1
- package/dist/sync/types.d.ts.map +1 -1
- package/manifest.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -176,7 +176,7 @@ Pause is the `paused` flag on a connected or syncing connection, not a state: it
|
|
|
176
176
|
|
|
177
177
|
- A scan that reaches `maxScanPages` pages or `maxCandidates` ids with more left keeps the first ids in the order given, marks the checkpoint `bounded` and stops. A finished scan moves the cycle to history from the same anchor. A scan that goes on keeps the `scanPageSize` its next page token was read under as the checkpoint's `pageTokenSize`, which a finished scan drops.
|
|
178
178
|
- A history page records its cursor as the target. The last page, with no next page token, moves the cycle to `apply`.
|
|
179
|
-
- A page of the wrong kind for the phase, a scan page past the bounds or larger than `scanPageSize`, an empty or
|
|
179
|
+
- A page of the wrong kind for the phase, a scan page past the bounds or larger than `scanPageSize`, an empty id or cursor or one over 1,024 characters, an empty page token or one over 4,096 characters, or a page whose next token is the token it was read with throws `invalid_source_sync_page`. A page token may be as long as Gmail's transport admits (its `maxPageTokenCharacters`, at most 4,096), so every token it hands on can be checkpointed.
|
|
180
180
|
|
|
181
181
|
`committableSourceCursor(checkpoint, summary)` answers the target cursor only in `apply` with no page token left, when the summary names the checkpoint's cycle, generation and revision, holds no pending or retry work, and its applied, gone and skipped counts add up to its total. Otherwise it answers null. `isTerminalSourceWork` is true for applied, gone and skipped work.
|
|
182
182
|
|
|
@@ -225,9 +225,9 @@ Provider reads, embedding and model calls run between store calls, never inside
|
|
|
225
225
|
|
|
226
226
|
A sync holds a lease. `claim(scope, trigger)` answers a handle only when the owner is active, the `active` binding agrees, no barrier or live lease is set and `sourceSyncDue` holds; `renew(handle)` extends the lease by `leaseMs`; `release(handle, event?)` gives it up, records a deferral or a fixed failure when one is given, and keeps the checkpoint and work for the next claim. `openCycle` opens a checkpoint or answers the one already open, `page` records a page and queues its ids in one transaction (the same page sent again right after answers the same checkpoint; any other stale revision answers null), and `takeWork` marks the next due item attempted before the read; an item that reached five attempts without a recorded result is not taken but waits `pollMs` as a `storage_unavailable` retry. Every call made with a handle checks the owner fence, the lease token and expiry, the generation and the `active` binding in the same transaction; once any of them has moved on, `release(handle)` answers false and every other call answers null.
|
|
227
227
|
|
|
228
|
-
`applyResult(handle, work, result, prepared)` keeps a `retry` result unresolved. A `document` result is weighed first: the store ranks this connection's retained sources and the new one by activity time, newest first with ties broken by source id, and keeps those inside `maxRetainedDocuments`, `maxHeldCharacters` and the allowance. A document that does not fit is recorded as skipped with `document_limit`, `held_limit` or `indexing_limit`, and an excluded one with `excluded`. A document that fits replaces the source's previous copy in the same transaction (host write, indexing charge and provenance), after that copy and every derived result that depends on it are removed through the fence, and this connection's other sources the limits no longer admit are removed with it, never another connection's. A read that repeats the text and message spans of a copy the store still holds, within its expiry and window, adds nothing to index: it is charged nothing and is not weighed against the indexing allowance, so neither a reconcile that reads every retained source again nor a change to a source's labels or history spends any of it. Any other read of such a copy is weighed against the indexing allowance and charged by its new and changed messages: the store keeps the hash of each message's text, and a message the copy holds with the same id, text hash, cut and length is free, as is the text before it (its separator and any header lines) when that text is the copy's and the message before it is the one the copy has there, itself unchanged (`leadHash` on each span); a changed header line or separator is charged, and so are the separator after an edited message and the separator of a message that follows another neighbour than it did. A reply is charged its separator and text, a message edited in place is charged with the separators beside it, and a read that only drops messages is charged nothing, since the messages it keeps follow the same neighbours among those kept (a message that becomes the first keeps its header lines but loses its separator, so those lines are charged once). A connector that caps a thread's text and spends it on the newest messages first, as Gmail's does under its `maxThreadCharacters`, cuts the oldest message shorter at each reply near the cap: that message is charged again at its new length, with the lead of the message after it (its separator and any header lines), and the rest of the thread is not. A copy whose messages keep no text hash, as an earlier release wrote it, is weighed by the hash of its whole text instead: a read that begins with that text, every message of the copy at the same span, is charged what follows it, and any other read, like every read of a copy without either hash, is charged in full. When the read also repeats the copy's version and content hash, the `refresh` binding keeps the copy in place, with every result derived from it, and gives it the read's expiry and message windows; otherwise, and for a host without the binding, the copy is written again from a fresh preparation. A `gone` result, a skip and an excluded document remove the source's previous copy, except an `indexing_limit` skip whose previous copy is within its expiry and window, still admitted as it is by the retained limits, and where the new read begins: the read's text starts with the copy's text, by the hash the store keeps of it, and holds every message of it at the same span. That copy, admitted and charged under an earlier read, stays with the shorter of its own and the read's expiry and message windows until a later read of the source finds room in the allowance (a change to it, or a reconcile) or the copy expires; a read that lost or changed one of its messages removes it. A reply that cuts the oldest message of a thread at the cap changes that message, so with the allowance spent it removes the thread's copy, and the thread stays out of the store until a read of it fits the allowance whole. A copy past its expiry or window counts as not held, whether or not `expire` has removed it yet. Given `prepared` as null, a document the store has to write answers `pending` with the same handle and records nothing; apply it again with its prepared value. Such a document reaches the `allowance` binding in both calls, so keep that binding to reads. A failing binding rolls the whole application back. The answer carries a new handle whenever a removal advanced the owner's fence; later calls use it. `finish` commits the cycle's target cursor once every work item is terminal, counting from the stored work, and `progress` records the counts so far.
|
|
228
|
+
`applyResult(handle, work, result, prepared)` keeps a `retry` result unresolved. A `document` result is weighed first: the store ranks this connection's retained sources and the new one by activity time, newest first with ties broken by source id, and keeps those inside `maxRetainedDocuments`, `maxHeldCharacters` and the allowance. A document that does not fit is recorded as skipped with `document_limit`, `held_limit` or `indexing_limit`, and an excluded one with `excluded`. A document that fits replaces the source's previous copy in the same transaction (host write, indexing charge and provenance), after that copy and every derived result that depends on it are removed through the fence, and this connection's other sources the limits no longer admit are removed with it, never another connection's. A read that repeats the text and message spans of a copy the store still holds, within its expiry and window, adds nothing to index: it is charged nothing and is not weighed against the indexing allowance, so neither a reconcile that reads every retained source again nor a change to a source's labels or history spends any of it. Any other read of such a copy is weighed against the indexing allowance and charged by its new and changed messages: the store keeps the hash of each message's text, and a message the copy holds with the same id, text hash, cut and length is free, as is the text before it (its separator and any header lines) when that text is the copy's and the message before it is the one the copy has there, itself unchanged (`leadHash` on each span); a changed header line or separator is charged, and so are the separator after an edited message and the separator of a message that follows another neighbour than it did. A reply is charged its separator and text, a message edited in place is charged with the separators beside it, and a read that only drops messages is charged nothing, since the messages it keeps follow the same neighbours among those kept (a message that becomes the first keeps its header lines but loses its separator, so those lines are charged once). A connector that caps a thread's text and spends it on the newest messages first, as Gmail's does under its `maxThreadCharacters`, cuts the oldest message shorter at each reply near the cap: that message is charged again at its new length, with the lead of the message after it (its separator and any header lines), and the rest of the thread is not. A copy whose messages keep no text hash, as an earlier release wrote it, is weighed by the hash of its whole text instead: a read that begins with that text, every message of the copy at the same span, is charged what follows it, and any other read, like every read of a copy without either hash, is charged in full. When the read also repeats the copy's version and content hash, the `refresh` binding keeps the copy in place, with every result derived from it, and gives it the read's expiry and message windows; otherwise, and for a host without the binding, the copy is written again from a fresh preparation. A `gone` result, a skip and an excluded document remove the source's previous copy, except an `indexing_limit` skip whose previous copy is within its expiry and window, still admitted as it is by the retained limits, and where the new read begins: the read's text starts with the copy's text, by the hash the store keeps of it, and holds every message of it at the same span. That copy, admitted and charged under an earlier read, stays with the shorter of its own and the read's expiry and message windows until a later read of the source finds room in the allowance (a change to it, or a reconcile) or the copy expires; a read that lost or changed one of its messages removes it. A reply that cuts the oldest message of a thread at the cap changes that message, so with the allowance spent it removes the thread's copy, and the thread stays out of the store until a read of it fits the allowance whole. A `gone` result and a skip the provider answers withdraw the previous copy first, in a transaction of their own: its expiry moves to the store's clock, so from then on `readCurrent` answers it expired and the fence neither commits nor delivers anything derived from it, even when the removal that follows fails, as when the host's `purge` binding throws. A withdrawn copy is past its expiry, so the next `expire` or `sweepExpired` removes it, as does the read's retry. A copy past its expiry or window counts as not held, whether or not `expire` has removed it yet. Given `prepared` as null, a document the store has to write answers `pending` with the same handle and records nothing; apply it again with its prepared value. Such a document reaches the `allowance` binding in both calls, so keep that binding to reads. A failing binding rolls the whole application back, apart from such a withdrawal. The answer carries a new handle whenever a removal advanced the owner's fence; later calls use it. `finish` commits the cycle's target cursor once every work item is terminal, counting from the stored work, and `progress` records the counts so far.
|
|
229
229
|
|
|
230
|
-
Controls run with the owner blocked, a tune (below) aside. `control(scope, event, policy?)` applies `connect_started`, `grant_ready`, `pause`, `resume`, `use_changed`, `policy_changed` (with the new policy), `grant_lost` or `disconnect`: it records a content-free barrier and drops the open cycle in one transaction, then completes the barrier and reactivates the owner. Connecting, grant loss and disconnecting remove the connection's sources, their derived results and its exclusions. Pause, resume, a use change and a policy change move retained content to the new generation with its version kept and its expiry never extended, so no result derived before the change can be delivered again; a policy change also removes the sources the new limits leave out and shortens the expiry of the rest to the new window. `exclude(scope, sourceId)` removes one source and keeps a content-free exclusion; `resetExclusions(scope)` clears them. Both raise the generation and keep the committed cursor, and make a reconcile the next cycle: a fresh bounded scan, then history replayed from that cursor, so a change made since it reaches the store even for an item the scan does not list. A control other than disconnecting throws `stale_source_sync` while the `active` binding refuses the owner. A barrier left by a failure blocks claims and reactivation until `recoverControl(scope)` completes it, and a lifecycle worker calls it even for a paused connection. `expire(scope, limit)` removes retained sources whose expiry has passed, also while the connection is paused or the owner's fence is inactive, as for a suspended account, which stays inactive, then the owner's expired derived results; reads refuse an expired source either way. Each source goes in a transaction of its own. When a removal or the results' expiry fails, `expire` throws the failure; once it had removed a source, it throws a `SourceSyncExpiryError` with the failure's message and `cause`, whose `partial` counts the removals made before it. `sweepExpired(limit?, owner?)` does the same across every connection, or one owner's, the earliest expiry first and by the store's own expiry, however far a maintenance walk is from them, and answers `{ removed, failed }`: an owner whose removal fails, as when its host purge keeps failing, is counted and left out of the call's later reads, so a call with up to `limit` such owners never holds back another owner's copies. An owner whose derived results then fail to expire is counted too, once; the call still answers every source it removed, and the other owners' results still expire. `removeOwner(owner, remove?)` removes a stopped owner's rows in one transaction: each of its connections, with its work rows, provenance and exclusions, once every one is disconnected with no barrier, lease, work or retained source, after running the lifecycle's own `remove` in the same transaction; the core fence's owner row and deletion records stay, since they hold no content and a restore replays the deletion from them.
|
|
230
|
+
Controls run with the owner blocked, a tune (below) aside. `control(scope, event, policy?)` applies `connect_started`, `grant_ready`, `pause`, `resume`, `use_changed`, `policy_changed` (with the new policy), `grant_lost` or `disconnect`: it records a content-free barrier and drops the open cycle in one transaction, then completes the barrier and reactivates the owner. Connecting, grant loss and disconnecting remove the connection's sources, their derived results and its exclusions. Pause, resume, a use change and a policy change move retained content to the new generation with its version kept and its expiry never extended, so no result derived before the change can be delivered again; a policy change also removes the sources the new limits leave out and shortens the expiry of the rest to the new window. `exclude(scope, sourceId)` removes one source and keeps a content-free exclusion; `resetExclusions(scope)` clears them. Both raise the generation and keep the committed cursor, and make a reconcile the next cycle: a fresh bounded scan, then history replayed from that cursor, so a change made since it reaches the store even for an item the scan does not list. A control other than disconnecting throws `stale_source_sync` while the `active` binding refuses the owner. A barrier left by a failure blocks claims and reactivation until `recoverControl(scope)` completes it, and a lifecycle worker calls it even for a paused connection. `expire(scope, limit)` removes retained sources whose expiry has passed, also while the connection is paused or the owner's fence is inactive, as for a suspended account, which stays inactive, then the owner's expired derived results; reads refuse an expired source either way. Each source goes in a transaction of its own. When a removal or the results' expiry fails, `expire` throws the failure; once it had removed a source, it throws a `SourceSyncExpiryError` with the failure's message and `cause`, whose `partial` counts the removals made before it in `removed` and names their sources in `sourceIds`, in the order they went. Those removals committed, so a host that counts what `expire` removed adds `partial.removed` in its catch, as `maintain` does. `sweepExpired(limit?, owner?)` does the same across every connection, or one owner's, the earliest expiry first and by the store's own expiry, however far a maintenance walk is from them, and answers `{ removed, failed }`: an owner whose removal fails, as when its host purge keeps failing, is counted and left out of the call's later reads, so a call with up to `limit` such owners never holds back another owner's copies. An owner whose derived results then fail to expire is counted too, once; the call still answers every source it removed, and the other owners' results still expire. `removeOwner(owner, remove?)` removes a stopped owner's rows in one transaction: each of its connections, with its work rows, provenance and exclusions, once every one is disconnected with no barrier, lease, work or retained source, after running the lifecycle's own `remove` in the same transaction; the core fence's owner row and deletion records stay, since they hold no content and a restore replays the deletion from them.
|
|
231
231
|
|
|
232
232
|
```ts
|
|
233
233
|
import { sourceSyncContentChanges } from '@framers/agentos-ext-account-sources';
|
|
@@ -281,18 +281,19 @@ async function readItem(url: string, attempt: number): Promise<Uint8Array | null
|
|
|
281
281
|
return result.value.body;
|
|
282
282
|
}
|
|
283
283
|
|
|
284
|
-
//
|
|
284
|
+
// The coordinator's maintenance compacts the tables when it is given the quota (below). Without it, a scheduled job
|
|
285
|
+
// compacts them a page at a time, until nothing more is due.
|
|
285
286
|
let compaction = await quota.compact();
|
|
286
287
|
while (compaction.more) compaction = await quota.compact();
|
|
287
288
|
```
|
|
288
289
|
|
|
289
290
|
`SourceQuota` admits provider requests against weighted budgets that every worker shares through PostgreSQL: a project's rolling minute (`projectMinute`), one mailbox's rolling minute (`mailboxMinute`) and a project's UTC day (`projectDay`). Each budget is a core `SqlSpendMeter` under a table prefix of its own (`<prefix>_pm`, `<prefix>_mm` and `<prefix>_pd`), and at most `projectConcurrency` requests of a project and `mailboxConcurrency` of one mailbox are in flight at once. The quota needs a PostgreSQL adapter with transactions and runs no DDL: the host's migration runs, each with `exec`, the seven scripts `sourceQuotaSchema(prefix)` answers, under a prefix of a lower-case letter and at most 27 lower-case letters, digits or underscores (`agentos_source_quota` unless given). Keys are opaque strings of 1 to 512 characters; a mailbox key stays the same for its mailbox and is never an address. The tables hold keys, counts and times, never content.
|
|
290
291
|
|
|
291
|
-
`run(request, send, signal?)` decides in one transaction under the project's row lock. An attempt id seen before answers `{ kind: 'duplicate' }`. A recorded provider wait, a full concurrency limit or a budget without room for the method's weight answers `{ kind: 'deferred', reason, retryAt }`, with the wait's own time, the earliest expiry of the slots in the way, 60,001 milliseconds on for a
|
|
292
|
+
`run(request, send, signal?)` decides in one transaction under the project's row lock. An attempt id seen before answers `{ kind: 'duplicate' }`. A recorded provider wait, a full concurrency limit or a budget without room for the method's weight answers `{ kind: 'deferred', reason, retryAt }`, with the wait's own time, the earliest expiry of the slots in the way, for a minute budget the time enough of the units in its window have left it (a minute and a millisecond after their reservations, or 60,001 milliseconds on for a weight larger than the budget), or the next UTC midnight for the day; a refusal by one budget rolls back what the others took. Otherwise the transaction consumes the weight in all three budgets, reads the clock again and records the attempt's slot, and a second transaction starts the call. The call has a second from that second reading to start, so however long the three budgets' statements take, none of it comes out of that second. The slot's record, the commit and the second transaction's wait for a connection and for the project's lock do come out of it: no reading of the clock can follow a commit inside its own transaction, and only the start's reading catches a process that stalled after the commit. An attempt that cannot start within it, after a slow commit, a long wait for the project's lock or a stalled process, answers `{ kind: 'late', retryAt }` and gives its weight back to the three budgets, since nothing was sent: it is retryable with a new attempt id from `retryAt`, a second after the late start was found. Otherwise `run` calls `send` once, outside any transaction, with a signal that aborts after `timeoutMs` or with the caller's signal, then answers `{ kind: 'completed', value }`. Nothing is sent for a duplicate, a deferral or a late start. Units once consumed stay consumed after a failed request, and after a provider wait recorded between the reservation and the call defers the request. A retry is a new `run` with a new attempt id, and pays again. `send` consumes or cancels the response body before it resolves, honors the signal and never retries. The slot frees when `run` finishes, whether it sent or not, or, for a process that dies mid-request, once a second to start, `timeoutMs` and `slotGraceMs` have passed; the attempt id stays refused either way.
|
|
292
293
|
|
|
293
294
|
`run` throws `source_sync_invalid_response` for a key outside those bounds or a method without a weight, `source_sync_cancelled` when the caller's signal aborted before the call or by the time `send` resolves, `source_sync_network` when `send` resolves after its timeout aborted it, and `source_sync_storage_unavailable` when the store cannot answer. Every worker on the same tables runs the same policy: the first one to use a project records its policy there, and a worker with another policy gets `source_sync_storage_unavailable` too. An error that `send` throws reaches the caller unchanged, unless the store then fails to free the slot.
|
|
294
295
|
|
|
295
|
-
`defer(scope, retryAt)` records a provider's wait until `retryAt`, in epoch milliseconds, for one mailbox (`{ projectKey, mailboxKey }`) or the whole project (`{ projectKey }`). A shorter wait never replaces a longer one, and every worker honors it, across restarts. `compact()` deletes attempt records a day after their slots expired, mailbox waits that have passed, the meters' reservations settled more than a day ago and the minute budgets' rows idle for a day, at most 1,000 rows of each table a call; the daily totals stay. It answers what it deleted as `{ attempts, mailboxWaits, reservations, windows, more }`: the rows of each kind, with the three meters' reservations counted together and the two minute budgets' rows together, and `more`, true when a table gave a full 1,000 rows.
|
|
296
|
+
`defer(scope, retryAt)` records a provider's wait until `retryAt`, in epoch milliseconds, for one mailbox (`{ projectKey, mailboxKey }`) or the whole project (`{ projectKey }`). A shorter wait never replaces a longer one, and every worker honors it, across restarts. `compact()` deletes attempt records a day after their slots expired, mailbox waits that have passed, the meters' reservations settled more than a day ago and the minute budgets' rows idle for a day, at most 1,000 rows of each table a call; the daily totals stay. It answers what it deleted as `{ attempts, mailboxWaits, reservations, windows, more }`: the rows of each kind, with the three meters' reservations counted together and the two minute budgets' rows together, and `more`, true when a table gave a full 1,000 rows. The coordinator's `maintain` calls it in the first batch of each walk when it is given the quota (`quota`), again while `more` is true, ten calls at most; a host without a coordinator calls it on a schedule, and again while `more` is true. Attempt ids must never repeat: once its record is compacted, an old id is no longer refused.
|
|
296
297
|
|
|
297
298
|
`sourceRetryAt(now, attempt, retryAfter, random?)` answers when a failed request may be tried again, for attempts 1 to 5: `now` plus one second doubled for each earlier attempt, with up to as much again added as jitter (`random`, from 0 to 1, `Math.random()` unless given), capped at 60 seconds. A `Retry-After` value, in delta seconds or an exact IMF-fixdate, wins when it is later, and is never capped; a value it cannot read is ignored. A `now` that is not a nonnegative safe integer, an attempt outside 1 to 5, a jitter outside 0 to 1 or a time past the latest date throws `source_sync_invalid_response`.
|
|
298
299
|
|
|
@@ -309,6 +310,7 @@ for (const sql of sourceSyncCoordinatorSchema()) await db.exec(sql);
|
|
|
309
310
|
const sync = new AccountSourceSync<PreparedPassages>({
|
|
310
311
|
store, // the SqlAccountSourceSyncStore above
|
|
311
312
|
lifecycle, // purge recovery and the grant-loss handoff: a SourceRevocations (below)
|
|
313
|
+
quota, // the SourceQuota above, whose old records maintenance compacts
|
|
312
314
|
// Builds the connector bound to this lease; it sends no request while building.
|
|
313
315
|
provider: async (currentHandle) => connectorFor(scope, currentHandle).sync,
|
|
314
316
|
// Embeds outside any transaction; the store commits the result with its document.
|
|
@@ -318,7 +320,8 @@ const sync = new AccountSourceSync<PreparedPassages>({
|
|
|
318
320
|
const result = await sync.run(scope, 'scheduled');
|
|
319
321
|
// result.kind: completed, idle, yielded, deferred, failed, reconnect, stale or unavailable
|
|
320
322
|
|
|
321
|
-
// Maintenance, at least once a minute, for every connection.
|
|
323
|
+
// Maintenance, from the host's maintenance tick at least once a minute, for every connection. Each walk starts from
|
|
324
|
+
// null, and its first batch also clears the quota's and the lifecycle's old records.
|
|
322
325
|
let after: SourceSyncScope | null = null;
|
|
323
326
|
do after = (await sync.maintain(after, 100)).next; while (after !== null);
|
|
324
327
|
```
|
|
@@ -348,7 +351,7 @@ A `grant_rejected` or `insufficient_scope` failure goes to `lifecycle.loseGrant`
|
|
|
348
351
|
| `stale` | The lease, the generation or the owner's fence moved on; the run committed nothing more |
|
|
349
352
|
| `unavailable` | The store could not be reached; no retry time was recorded, and a lease the run held expires on its own |
|
|
350
353
|
|
|
351
|
-
`maintain(after?, limit?)` is a maintenance batch: for up to `limit` connections after `after`, in key order and in every state, paused, blocked and disconnected included, it calls `lifecycle.recover`, the store's `recoverControl` and `expire(scope, 100)`, after a sweep of up to `limit` sources whose expiry has passed from any connection (`sweepExpired`), so no expired copy waits for the walk to reach its connection; each owner the sweep could not clear, and a sweep that could not read, count in `failed`. A failure is counted in `failed` and the next connection still runs, and the sources an `expire` removed before it failed count in `expired`; no provider is called. It answers `scanned`, `expired`, `failed` and `next`: pass `next` as `after` to the next batch, and start again from null once it is null.
|
|
354
|
+
`maintain(after?, limit?)` is a maintenance batch: for up to `limit` connections after `after`, in key order and in every state, paused, blocked and disconnected included, it calls `lifecycle.recover`, the store's `recoverControl` and `expire(scope, 100)`, after a sweep of up to `limit` sources whose expiry has passed from any connection (`sweepExpired`), so no expired copy waits for the walk to reach its connection; each owner the sweep could not clear, and a sweep that could not read, count in `failed`. A failure is counted in `failed` and the next connection still runs, and the sources an `expire` removed before it failed count in `expired`; no provider is called. The batch that starts a walk (`after` null) then clears what the retention has passed: given the quota (`quota`), the quota's `compact`, again while it answers `more`, ten calls at most, so attempt records and settled reservations a day old go; then, when the lifecycle has them, as a `SourceRevocations` does, the lifecycle's `compact` and `removeDeletedOwners(limit)`, so the rows a deleted owner leaves, its connections in the store and its lifecycle records, go once nothing about them is pending. Each of these that fails counts in `failed`, and the others still run. It answers `scanned`, `expired`, `failed`, `compacted` (the rows those compactions deleted), `removedOwners` (the deleted owners whose rows went) and `next`: pass `next` as `after` to the next batch, and start again from null once it is null. Run it from the host's maintenance tick at least once a minute; reads refuse expired content whether or not it runs.
|
|
352
355
|
|
|
353
356
|
With an `events` sink the coordinator reports `started` at the claim, `progress` with the count of retained sources after each read, `yielded` and `retry` with the reads made, `succeeded` with the count of retained sources, `reconnect`, and `purged` with the sources a maintenance batch expired. Each event carries `kind`, `state` and `n`, and `yielded`, `retry`, `succeeded` and `reconnect` also the run's duration as `ms`. A sink that throws is ignored.
|
|
354
357
|
|
|
@@ -386,7 +389,7 @@ The host wires it in four places. The store's `active` binding answers true only
|
|
|
386
389
|
|
|
387
390
|
`revokeBatch(limit?, signal?)` is the account-independent worker. It claims due queue rows, one worker per row, opens each token and revokes it with the revoker's `revoke` outside any transaction, within 15 seconds. A success confirms the row and erases its ciphertext. A failure is retried after 1, 2, 4, 8 and then 15 minutes, whatever status the provider answered. Each token's deadline is 23 hours and 59 minutes after it was queued, and neither a retry, a restart nor a repeated disconnect or deletion moves it: at the deadline the ciphertext is erased and the row records that the permission must be removed at the provider. A token that does not open, because its ciphertext was moved to another row or its key is gone, is erased the same way and never sent. A worker whose claim expired cannot settle a row another worker claimed since. The batch answers `{ attempted, confirmed, deferred, expired, unreadable }`. The database erases nothing on its own when a deadline passes: reads and dispatch stop at the deadline, and erasure needs the worker to run, so schedule it at least once a minute.
|
|
388
391
|
|
|
389
|
-
`status(scope)` answers `{ localPending, revocation }`, with `revocation` one of `not_needed`, `pending`, `confirmed` and `permission_removal_required`; the local purge completes whatever the revocation's outcome. A provider can revoke a whole grant rather than one connection's, so `canConnect` stays false while a revocation of the owner's is pending, or expired or unreadable and not yet acknowledged. `acknowledgeRemoval(scope)` records the account owner's statement that the permission was removed at the provider, after which a new grant may begin; it is an attestation, never a confirmation. `compact()` removes, a day after their deadline, terminal rows that nothing refers to. `removeOwner(owner)` removes a deleted owner's rows in one transaction once nothing about them is pending: its connections and their work, provenance and exclusions in the store, and its stop intents, the queue rows they and its exchanges refer to, its grant leases and its exchanges here. It answers `pending`, changing nothing, while the deletion's purge or a revocation of its grants is pending and until a day after its last exchange ended, since a grant can still return for that exchange and must find its record to be queued for revocation; it answers `not_deleted` for an owner whose deletion is not recorded, and `removed` again for an owner already removed. The block marker stays, recording the deletion, so `permits` and `canConnect` stay false and the owner is refused for good, even while the host's account row still reads active; the core fence's owner row and deletion records stay too. `removeDeletedOwners(limit?)` runs it for at most `limit` deleted owners a call, those with rows left to remove and nothing pending, for a host whose own records of a deleted account are gone
|
|
392
|
+
`status(scope)` answers `{ localPending, revocation }`, with `revocation` one of `not_needed`, `pending`, `confirmed` and `permission_removal_required`; the local purge completes whatever the revocation's outcome. A provider can revoke a whole grant rather than one connection's, so `canConnect` stays false while a revocation of the owner's is pending, or expired or unreadable and not yet acknowledged. `acknowledgeRemoval(scope)` records the account owner's statement that the permission was removed at the provider, after which a new grant may begin; it is an attestation, never a confirmation. `compact()` removes, a day after their deadline, terminal rows that nothing refers to. `removeOwner(owner)` removes a deleted owner's rows in one transaction once nothing about them is pending: its connections and their work, provenance and exclusions in the store, and its stop intents, the queue rows they and its exchanges refer to, its grant leases and its exchanges here. It answers `pending`, changing nothing, while the deletion's purge or a revocation of its grants is pending and until a day after its last exchange ended, since a grant can still return for that exchange and must find its record to be queued for revocation; it answers `not_deleted` for an owner whose deletion is not recorded, and `removed` again for an owner already removed. The block marker stays, recording the deletion, so `permits` and `canConnect` stay false and the owner is refused for good, even while the host's account row still reads active; the core fence's owner row and deletion records stay too. `removeDeletedOwners(limit?)` runs it for at most `limit` deleted owners a call, those with rows left to remove and nothing pending, for a host whose own records of a deleted account are gone. The coordinator's `maintain` runs it and `compact` in the first batch of each walk when this service is its lifecycle; a host without a coordinator runs them on a schedule beside `revokeBatch`. An owner already removed is not taken again.
|
|
390
393
|
|
|
391
394
|
`withGrant(handle, work, signal?)` runs one grant operation under a durable 30-second grant lease, without holding a transaction over the network; another worker gets `rate_limited` until the lease expires, and the lease is never renewed. `work` receives a `SealedTokenStore` and a signal that aborts after 15 seconds. Every load and save through that store, and the final return, recheck the sync handle and the lease, so after a disconnect or once the lease has expired a held token can be neither saved nor returned (`grant_rejected`).
|
|
392
395
|
|
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { AccountSourceSyncProvider, SourceSyncScope, SourceSyncTrigger, SourceSyncRequest, SourceSyncDocument, SourceSyncRetryReason, SourceSyncEventSink } from './types.js';
|
|
8
8
|
import { type SqlAccountSourceSyncStore, type SourceSyncHandle } from './SqlAccountSourceSyncStore.js';
|
|
9
|
+
import { type SourceQuota } from './SourceQuota.js';
|
|
9
10
|
/**
|
|
10
|
-
* The host's lifecycle binding: recovery of its committed purges
|
|
11
|
-
* coordinator calls it; it never calls a provider for content.
|
|
11
|
+
* The host's lifecycle binding: recovery of its committed purges, the fenced handoff of a lost grant and, when it keeps
|
|
12
|
+
* records of its own, their cleanup. The coordinator calls it; it never calls a provider for content.
|
|
12
13
|
*/
|
|
13
14
|
export interface SourceSyncLifecycle {
|
|
14
15
|
/** Recover committed host purge markers; active() remains false until recovery completes. */
|
|
@@ -19,6 +20,20 @@ export interface SourceSyncLifecycle {
|
|
|
19
20
|
* @returns Whether the handle was current and the grant was fenced.
|
|
20
21
|
*/
|
|
21
22
|
loseGrant(handle: SourceSyncHandle, reason: 'grant_rejected' | 'insufficient_scope'): Promise<boolean>;
|
|
23
|
+
/**
|
|
24
|
+
* Removes terminal lifecycle records that nothing refers to, a page a call. When present, `maintain` calls it in the
|
|
25
|
+
* first batch of each walk; `SourceRevocations.compact` is one.
|
|
26
|
+
*
|
|
27
|
+
* @returns How many rows were removed.
|
|
28
|
+
*/
|
|
29
|
+
compact?(): Promise<number>;
|
|
30
|
+
/**
|
|
31
|
+
* Removes the remaining rows of at most `limit` deleted owners with nothing pending. When present, `maintain` calls
|
|
32
|
+
* it in the first batch of each walk with that batch's limit; `SourceRevocations.removeDeletedOwners` is one.
|
|
33
|
+
*
|
|
34
|
+
* @returns How many owners' rows were removed.
|
|
35
|
+
*/
|
|
36
|
+
removeDeletedOwners?(limit?: number): Promise<number>;
|
|
22
37
|
}
|
|
23
38
|
/**
|
|
24
39
|
* What a coordinator runs with: the store, the provider factory, document preparation, the lifecycle binding and
|
|
@@ -41,8 +56,13 @@ export interface AccountSourceSyncOptions<Prepared> {
|
|
|
41
56
|
* when the host has no `refresh` binding. A read the store skips is never prepared.
|
|
42
57
|
*/
|
|
43
58
|
readonly prepare: (request: SourceSyncRequest, document: SourceSyncDocument) => Promise<Prepared>;
|
|
44
|
-
/** The host's purge recovery and grant-loss handoff. */
|
|
59
|
+
/** The host's purge recovery and grant-loss handoff, and the cleanup of its records when it has one. */
|
|
45
60
|
readonly lifecycle: SourceSyncLifecycle;
|
|
61
|
+
/**
|
|
62
|
+
* The provider quota whose day-old attempt records and settled reservations `maintain` compacts in the first batch
|
|
63
|
+
* of each walk. Without it the host runs `SourceQuota.compact` on a schedule of its own.
|
|
64
|
+
*/
|
|
65
|
+
readonly quota?: Pick<SourceQuota, 'compact'>;
|
|
46
66
|
/** Current time as integer UTC epoch milliseconds; `Date.now` unless given. */
|
|
47
67
|
readonly clock?: () => number;
|
|
48
68
|
/** Retry jitter from 0 to 1; `Math.random` unless given. */
|
|
@@ -78,13 +98,18 @@ export type SourceSyncRunResult = {
|
|
|
78
98
|
/**
|
|
79
99
|
* One maintenance batch: the connections visited, the sources expired by the batch's sweep and its visits (also those
|
|
80
100
|
* an expiry removed before it failed), the failures (each connection whose maintenance failed, each owner the sweep
|
|
81
|
-
* could not clear,
|
|
82
|
-
*
|
|
101
|
+
* could not clear, a sweep that could not read, and each cleanup of a walk's first batch that failed), the rows that
|
|
102
|
+
* cleanup's compactions deleted, the deleted owners whose rows it removed, and the scope to pass as `after` to the next
|
|
103
|
+
* batch, null once the last batch is done.
|
|
83
104
|
*/
|
|
84
105
|
export interface SourceSyncMaintenanceResult {
|
|
85
106
|
readonly scanned: number;
|
|
86
107
|
readonly expired: number;
|
|
87
108
|
readonly failed: number;
|
|
109
|
+
/** Rows the quota's and the lifecycle's compaction deleted; zero in every batch but a walk's first. */
|
|
110
|
+
readonly compacted: number;
|
|
111
|
+
/** Deleted owners whose remaining rows the lifecycle removed; zero in every batch but a walk's first. */
|
|
112
|
+
readonly removedOwners: number;
|
|
88
113
|
readonly next: SourceSyncScope | null;
|
|
89
114
|
}
|
|
90
115
|
/**
|
|
@@ -92,7 +117,7 @@ export interface SourceSyncMaintenanceResult {
|
|
|
92
117
|
*
|
|
93
118
|
* `run` performs one connection's sync from its durable checkpoint and yields within its budgets; any coordinator on
|
|
94
119
|
* the same tables resumes it. `maintain` runs purge recovery and expiry for every connection, apart from provider
|
|
95
|
-
* polling. The coordinator holds no state between calls.
|
|
120
|
+
* polling, and once a walk the quota's and the lifecycle's cleanup. The coordinator holds no state between calls.
|
|
96
121
|
*
|
|
97
122
|
* @typeParam Prepared - The host's in-memory value for one document, passed to the store's `write` binding.
|
|
98
123
|
*/
|
|
@@ -133,11 +158,14 @@ export declare class AccountSourceSync<Prepared = unknown> {
|
|
|
133
158
|
* the walk is from them (`sweepExpired`). Then visits up to `limit` connections after `after` in key order, paused,
|
|
134
159
|
* blocked and disconnected ones included, and for each runs the lifecycle's recovery, the store's control recovery
|
|
135
160
|
* and the expiry of up to 100 sources. A failure is counted and the next connection still runs, and the sources an
|
|
136
|
-
* expiry removed before it failed (`SourceSyncExpiryError`) count as expired.
|
|
161
|
+
* expiry removed before it failed (`SourceSyncExpiryError`) count as expired. The batch that starts a walk (`after`
|
|
162
|
+
* null) then removes what the retention has passed: with `quota`, the quota's `compact`, again while it answers
|
|
163
|
+
* `more`, ten calls at most; then the lifecycle's `compact` and `removeDeletedOwners(limit)`, when it has them, as a
|
|
164
|
+
* `SourceRevocations` does. Each of those fails on its own, counted in `failed`. No provider is called.
|
|
137
165
|
*
|
|
138
|
-
* @param after - The `next` of the previous batch, or null to start from the first connection.
|
|
139
|
-
* @param limit - At most this many connections visited,
|
|
140
|
-
* 1,000.
|
|
166
|
+
* @param after - The `next` of the previous batch, or null to start a walk from the first connection.
|
|
167
|
+
* @param limit - At most this many connections visited, this many expired sources swept and, in a walk's first
|
|
168
|
+
* batch, this many deleted owners removed, an integer from 1 to 1,000.
|
|
141
169
|
* @throws {SourceSyncFault} `storage_unavailable` when the connections cannot be listed, a `limit` outside that
|
|
142
170
|
* range included.
|
|
143
171
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountSourceSync.d.ts","sourceRoot":"","sources":["../../src/sync/AccountSourceSync.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EACV,yBAAyB,EAAE,eA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27
|
const retriable = (fault) => retryReasons.includes(fault.code);
|
|
28
28
|
const digest = (parts) => createHash('sha256').update(JSON.stringify(parts)).digest('hex');
|
|
29
|
+
/** Quota compactions one maintenance walk runs at most, each deleting up to 1,000 rows of every quota table. */
|
|
30
|
+
const walkCompactions = 10;
|
|
29
31
|
/**
|
|
30
32
|
* One lease at a time; all durable state and authorization remain in the SQL store.
|
|
31
33
|
*
|
|
32
34
|
* `run` performs one connection's sync from its durable checkpoint and yields within its budgets; any coordinator on
|
|
33
35
|
* the same tables resumes it. `maintain` runs purge recovery and expiry for every connection, apart from provider
|
|
34
|
-
* polling. The coordinator holds no state between calls.
|
|
36
|
+
* polling, and once a walk the quota's and the lifecycle's cleanup. The coordinator holds no state between calls.
|
|
35
37
|
*
|
|
36
38
|
* @typeParam Prepared - The host's in-memory value for one document, passed to the store's `write` binding.
|
|
37
39
|
*/
|
|
@@ -392,11 +394,14 @@ export class AccountSourceSync {
|
|
|
392
394
|
* the walk is from them (`sweepExpired`). Then visits up to `limit` connections after `after` in key order, paused,
|
|
393
395
|
* blocked and disconnected ones included, and for each runs the lifecycle's recovery, the store's control recovery
|
|
394
396
|
* and the expiry of up to 100 sources. A failure is counted and the next connection still runs, and the sources an
|
|
395
|
-
* expiry removed before it failed (`SourceSyncExpiryError`) count as expired.
|
|
397
|
+
* expiry removed before it failed (`SourceSyncExpiryError`) count as expired. The batch that starts a walk (`after`
|
|
398
|
+
* null) then removes what the retention has passed: with `quota`, the quota's `compact`, again while it answers
|
|
399
|
+
* `more`, ten calls at most; then the lifecycle's `compact` and `removeDeletedOwners(limit)`, when it has them, as a
|
|
400
|
+
* `SourceRevocations` does. Each of those fails on its own, counted in `failed`. No provider is called.
|
|
396
401
|
*
|
|
397
|
-
* @param after - The `next` of the previous batch, or null to start from the first connection.
|
|
398
|
-
* @param limit - At most this many connections visited,
|
|
399
|
-
* 1,000.
|
|
402
|
+
* @param after - The `next` of the previous batch, or null to start a walk from the first connection.
|
|
403
|
+
* @param limit - At most this many connections visited, this many expired sources swept and, in a walk's first
|
|
404
|
+
* batch, this many deleted owners removed, an integer from 1 to 1,000.
|
|
400
405
|
* @throws {SourceSyncFault} `storage_unavailable` when the connections cannot be listed, a `limit` outside that
|
|
401
406
|
* range included.
|
|
402
407
|
*/
|
|
@@ -404,6 +409,8 @@ export class AccountSourceSync {
|
|
|
404
409
|
const scopes = await this.stored(() => this.store.scopes(after, limit));
|
|
405
410
|
let expired = 0;
|
|
406
411
|
let failed = 0;
|
|
412
|
+
let compacted = 0;
|
|
413
|
+
let removedOwners = 0;
|
|
407
414
|
// A copy past its expiry goes in this pass whichever page of connections the walk below visits.
|
|
408
415
|
try {
|
|
409
416
|
const sweep = await this.stored(() => this.store.sweepExpired(limit));
|
|
@@ -429,9 +436,44 @@ export class AccountSourceSync {
|
|
|
429
436
|
failed++;
|
|
430
437
|
}
|
|
431
438
|
}
|
|
439
|
+
// Once a walk, not once a batch: the quota's day-old attempt records and settled reservations, the lifecycle's
|
|
440
|
+
// terminal records and the rows of deleted owners with nothing pending, which no other step here removes. After
|
|
441
|
+
// the visits, so no visit meets an owner this removed.
|
|
442
|
+
if (after === null) {
|
|
443
|
+
const { quota, lifecycle } = this.options;
|
|
444
|
+
if (quota) {
|
|
445
|
+
try {
|
|
446
|
+
for (let call = 0; call < walkCompactions; call++) {
|
|
447
|
+
const page = await quota.compact();
|
|
448
|
+
compacted += page.attempts + page.mailboxWaits + page.reservations + page.windows;
|
|
449
|
+
if (!page.more)
|
|
450
|
+
break;
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
catch {
|
|
454
|
+
failed++;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
if (lifecycle.compact) {
|
|
458
|
+
try {
|
|
459
|
+
compacted += await lifecycle.compact();
|
|
460
|
+
}
|
|
461
|
+
catch {
|
|
462
|
+
failed++;
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
if (lifecycle.removeDeletedOwners) {
|
|
466
|
+
try {
|
|
467
|
+
removedOwners += await lifecycle.removeDeletedOwners(limit);
|
|
468
|
+
}
|
|
469
|
+
catch {
|
|
470
|
+
failed++;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
}
|
|
432
474
|
if (expired > 0)
|
|
433
475
|
this.emit('purged', expired);
|
|
434
|
-
return { scanned: scopes.length, expired, failed,
|
|
476
|
+
return { scanned: scopes.length, expired, failed, compacted, removedOwners,
|
|
435
477
|
next: scopes.length === limit ? scopes[scopes.length - 1] : null };
|
|
436
478
|
}
|
|
437
479
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountSourceSync.js","sourceRoot":"","sources":["../../src/sync/AccountSourceSync.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAMrD,OAAO,EACL,qBAAqB,GACtB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAyEjD,MAAM,SAAU,SAAQ,KAAK;IAAG,gBAAgB,KAAK,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;CAAE;AAC/E,MAAM,SAAU,SAAQ,KAAK;IAAG,gBAAgB,KAAK,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;CAAE;AAC/E,MAAM,YAAa,SAAQ,KAAK;IACT;IAAwC;IAA7D,YAAqB,MAA6B,EAAW,OAAe;QAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;QAAzF,WAAM,GAAN,MAAM,CAAuB;QAAW,YAAO,GAAP,OAAO,CAAQ;IAAmC,CAAC;CACjH;AACD,MAAM,YAAY,GAAqC,CAAC,SAAS,EAAE,cAAc,EAAE,sBAAsB,EAAE,qBAAqB,CAAC,CAAC;AAClI,MAAM,SAAS,GAAG,CAAC,KAAsB,EAAuE,EAAE,CAChH,YAA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,EAAE,CAAC;gBACtB,IAAI,CAAC;oBAAC,SAAS,IAAI,MAAM,SAAS,CAAC,OAAO,EAAE,CAAC;gBAAC,CAAC;gBAAC,MAAM,CAAC;oBAAC,MAAM,EAAE,CAAC;gBAAC,CAAC;YACrE,CAAC;YACD,IAAI,SAAS,CAAC,mBAAmB,EAAE,CAAC;gBAClC,IAAI,CAAC;oBAAC,aAAa,IAAI,MAAM,SAAS,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;gBAAC,CAAC;gBAAC,MAAM,CAAC;oBAAC,MAAM,EAAE,CAAC;gBAAC,CAAC;YAC1F,CAAC;QACH,CAAC;QACD,IAAI,OAAO,GAAG,CAAC;YAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa;YACxE,IAAI,EAAE,MAAM,CAAC,MAAM,KAAK,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACxE,CAAC;CACF"}
|
|
@@ -45,10 +45,11 @@ export interface SourceQuotaRequest {
|
|
|
45
45
|
export type SourceQuotaReason = 'project_minute' | 'mailbox_minute' | 'project_day' | 'project_concurrency' | 'mailbox_concurrency' | 'provider_wait';
|
|
46
46
|
/**
|
|
47
47
|
* What `SourceQuota.run` answers: the transport's value; a deferral with the earliest time, in epoch milliseconds, to
|
|
48
|
-
* try again, nothing sent; `late` when the call could not start within a second of
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* or `duplicate` for an attempt id
|
|
48
|
+
* try again, nothing sent; `late` when the call could not start within a second of the clock reading taken once its
|
|
49
|
+
* three budgets hold its weight, after a slow commit, a long wait for the project's lock or a stalled process: nothing
|
|
50
|
+
* was sent, so its units go back to the three budgets, and the attempt is retryable by a new `run` with a new attempt
|
|
51
|
+
* id from `retryAt`, in epoch milliseconds, a second after the late start was found; or `duplicate` for an attempt id
|
|
52
|
+
* seen before, which never sends.
|
|
52
53
|
*/
|
|
53
54
|
export type SourceQuotaResult<T> = {
|
|
54
55
|
readonly kind: 'completed';
|
|
@@ -95,7 +96,10 @@ export interface SourceQuotaOptions {
|
|
|
95
96
|
* `<prefix>_pm`, `<prefix>_mm` and `<prefix>_pd`. Throws `invalid_source_quota_prefix` for another prefix.
|
|
96
97
|
*/
|
|
97
98
|
export declare function sourceQuotaSchema(prefix?: string): readonly string[];
|
|
98
|
-
/**
|
|
99
|
+
/**
|
|
100
|
+
* Combines released meters, which decide every admission and every refund; this class never reimplements their
|
|
101
|
+
* accounting SQL. It reads a minute budget's reservations only to say when a request it refused has room.
|
|
102
|
+
*/
|
|
99
103
|
export declare class SourceQuota {
|
|
100
104
|
private readonly db;
|
|
101
105
|
private readonly options;
|
|
@@ -112,6 +116,13 @@ export declare class SourceQuota {
|
|
|
112
116
|
private meter;
|
|
113
117
|
private reserve;
|
|
114
118
|
private begin;
|
|
119
|
+
/**
|
|
120
|
+
* When a minute budget that refused `units` has room for them: a minute and a millisecond after the reservation of the
|
|
121
|
+
* consumed units whose leaving the window, the earliest first, frees enough, read from the core meter's reservations
|
|
122
|
+
* without the refused attempt's own. Units still reserved never leave the window by age, so with them in the way, or
|
|
123
|
+
* for more units than the budget holds, it answers a minute and a millisecond from now.
|
|
124
|
+
*/
|
|
125
|
+
private minuteRoom;
|
|
115
126
|
private release;
|
|
116
127
|
/**
|
|
117
128
|
* Consume weighted capacity and call the transport once. No inline HTTP retries: a retry, after a deferral or a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SourceQuota.d.ts","sourceRoot":"","sources":["../../src/sync/SourceQuota.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAInE,wFAAwF;AACxF,M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