@serfab/quereus-plugin-sereus 1.19.1 → 1.21.0
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 +1 -1
- package/dist/app-schema.d.ts +32 -12
- package/dist/app-schema.js +156 -33
- package/dist/app-schema.js.map +1 -1
- package/dist/cached-storage.d.ts +3 -1
- package/dist/cached-storage.js +12 -2
- package/dist/cached-storage.js.map +1 -1
- package/dist/compose-strand.js +11 -5
- package/dist/compose-strand.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/plugin-browser.js +28 -28
- package/dist/plugin-browser.js.map +4 -4
- package/dist/types.d.ts +16 -8
- package/package.json +8 -8
- package/src/app-schema.ts +183 -37
- package/src/cached-storage.ts +13 -2
- package/src/compose-strand.ts +11 -5
- package/src/index.ts +1 -1
- package/src/types.ts +17 -8
package/README.md
CHANGED
|
@@ -276,7 +276,7 @@ The result's `onCommitDurability(listener)` is called after every commit that wr
|
|
|
276
276
|
|
|
277
277
|
### Offline mode
|
|
278
278
|
|
|
279
|
-
With `offline` given, the result's `offline` is the queue's controller (`enter()`, `exit()`, `whenDrained()`, `onStatus(listener)`, `entries()`, …), passed through from `@optimystic/quereus-plugin-optimystic` ([Offline mode](https://github.com/gotchoices/optimystic/blob/main/packages/quereus-plugin-optimystic/README.md#offline-mode--pluginoffline)); `offlineControllerOf(db)` finds it from the `Database`, and the status, state and error types are re-exported here. The `Strand` tables are always acknowledged by the network, and an `App` schema apply that queued transactions refuse is retried once they drain rather than failing the connect: the result's `appSchema` settles with how it ended, and `appSchemaDeferredBy` names the transactions that refused it.
|
|
279
|
+
With `offline` given, the result's `offline` is the queue's controller (`enter()`, `exit()`, `whenDrained()`, `onStatus(listener)`, `entries()`, …), passed through from `@optimystic/quereus-plugin-optimystic` ([Offline mode](https://github.com/gotchoices/optimystic/blob/main/packages/quereus-plugin-optimystic/README.md#offline-mode--pluginoffline)); `offlineControllerOf(db)` finds it from the `Database`, and the status, state and error types are re-exported here. The `Strand` tables are always acknowledged by the network, and an `App` schema apply that queued transactions refuse is retried once they drain rather than failing the connect: the result's `appSchema` settles with how it ended, `appSchemaWaitingFor` is `'queue'`, and `appSchemaDeferredBy` names the transactions that refused it. An apply that cannot reach the strand's cohort is deferred too, offline mode or not (`appSchemaWaitingFor: 'cohort'`): see [strands.md → An app schema upgrade waits for the queue or the cohort](../../docs/strands.md#an-app-schema-upgrade-waits-for-the-queue-or-the-cohort). Where the queue is saved is in [strands.md → Offline mode](../../docs/strands.md#offline-mode).
|
|
280
280
|
|
|
281
281
|
### Founding a strand: `createEmptyCollections()`
|
|
282
282
|
|
package/dist/app-schema.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { type Database } from '@quereus/quereus';
|
|
2
|
-
import type {
|
|
2
|
+
import type { Libp2p } from '@libp2p/interface';
|
|
3
|
+
import type { StrandOfflineController, AppSchemaOutcome, AppSchemaWait } from './types.js';
|
|
3
4
|
/**
|
|
4
5
|
* Step 7 of `composeStrand`: declare the sApp's schema as `App` and apply it — a
|
|
5
6
|
* declarative diff against the catalog, so re-applying a schema that is already in place
|
|
6
7
|
* emits nothing. The one site that applies an `App` schema: `composeStrand` calls it at
|
|
7
|
-
* bring-up (through {@link
|
|
8
|
+
* bring-up (through {@link applyAppSchemaOrDefer}, whose deferred retry shares its
|
|
8
9
|
* declaration), and cadre-core's `StrandDatabase.attachAppSchema` calls it on a live storage
|
|
9
10
|
* replica when an app claims the strand. The database must already be composed (optimystic
|
|
10
11
|
* set as the default vtab), or the tables land in memory instead of the strand.
|
|
@@ -18,21 +19,40 @@ import type { StrandOfflineController, AppSchemaOutcome } from './types.js';
|
|
|
18
19
|
* the same key at once would collide. Rows an app needs at birth are the founding app's to write.
|
|
19
20
|
*/
|
|
20
21
|
export declare function applyAppSchema(db: Database, schema: string): Promise<void>;
|
|
21
|
-
/** What {@link
|
|
22
|
+
/** What {@link applyAppSchemaOrDefer} reports, in the shape `SereusPluginResult` carries it. */
|
|
22
23
|
export interface AppSchemaApply {
|
|
23
24
|
appSchema: Promise<AppSchemaOutcome>;
|
|
25
|
+
/** What the connect-time apply waits for. Present only when it was deferred. */
|
|
26
|
+
appSchemaWaitingFor?: AppSchemaWait;
|
|
27
|
+
/** The queued transaction ids that refused the connect-time apply. Present only when the queue refused it. */
|
|
24
28
|
appSchemaDeferredBy?: readonly string[];
|
|
25
29
|
}
|
|
30
|
+
/** The strand node's peer events, which a retry waiting for the cohort wakes on. */
|
|
31
|
+
export type PeerConnectEvents = Pick<Libp2p, 'addEventListener' | 'removeEventListener'>;
|
|
32
|
+
/** Where a deferred apply waits: the offline queue, when there is one, and the strand node, when there is one. */
|
|
33
|
+
export interface AppSchemaWaits {
|
|
34
|
+
queue?: Pick<StrandOfflineController, 'whenDrained'>;
|
|
35
|
+
peers?: PeerConnectEvents;
|
|
36
|
+
}
|
|
26
37
|
/**
|
|
27
|
-
* Step 7 of `composeStrand`: {@link applyAppSchema}, except that an apply refused
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
38
|
+
* Step 7 of `composeStrand`: {@link applyAppSchema}, except that an apply refused for a reason
|
|
39
|
+
* that passes does not throw. Two such reasons:
|
|
40
|
+
*
|
|
41
|
+
* - queued offline transactions wrote a table the apply changes (`QueuedEntriesBlockSchemaChangeError`);
|
|
42
|
+
* retried each time the queue drains;
|
|
43
|
+
* - the strand's cohort could not be reached (Optimystic's `classifyCommitFailure` says
|
|
44
|
+
* `cohort-unreachable`): an apply writes the strand's catalog, which needs the cohort, so a member
|
|
45
|
+
* alone after an app update would otherwise not open the strand at all (gotchoices/sereus#55).
|
|
46
|
+
* Retried when the strand node connects to a peer, and on a backoff ({@link COHORT_RETRY_MS}).
|
|
47
|
+
*
|
|
48
|
+
* Quereus unwinds a refused apply, whether a migration step or the closing catalog commit refused it,
|
|
49
|
+
* so `db` keeps the `App` schema it had, and `appSchema` settles with how the retries ended. Any other
|
|
50
|
+
* error from the first apply is thrown, and so is a refusal Quereus could not unwind that leaves a
|
|
51
|
+
* retry nothing to send ({@link retryableRefusalOf}).
|
|
32
52
|
*
|
|
33
|
-
* Waiting
|
|
34
|
-
*
|
|
35
|
-
*
|
|
53
|
+
* Waiting before returning was rejected: that withholds the strand from the app right after an app
|
|
54
|
+
* update, which is when a phone is most likely to be offline. So was refusing the connect: the queue
|
|
55
|
+
* can drain only while the composition is alive.
|
|
36
56
|
*
|
|
37
57
|
* `released` is aborted when the composition shuts down; a retry not yet landed then settles
|
|
38
58
|
* `cancelled`.
|
|
@@ -42,4 +62,4 @@ export interface AppSchemaApply {
|
|
|
42
62
|
* apply would be committed or rolled back with the app's rows, and a rollback leaves the index it
|
|
43
63
|
* built holding entries for rows that are gone.
|
|
44
64
|
*/
|
|
45
|
-
export declare function
|
|
65
|
+
export declare function applyAppSchemaOrDefer(db: Database, schema: string, waits: AppSchemaWaits, released: AbortSignal): Promise<AppSchemaApply>;
|
package/dist/app-schema.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import debug from 'debug';
|
|
2
2
|
import { TransactionActiveError } from '@quereus/quereus';
|
|
3
|
+
import { classifyCommitFailure } from '@optimystic/db-core';
|
|
3
4
|
import { QueuedEntriesBlockSchemaChangeError, QueueDisposedError } from '@optimystic/quereus-plugin-optimystic/plugin';
|
|
4
5
|
const log = debug('sereus:plugin:strand');
|
|
5
6
|
/**
|
|
6
7
|
* Step 7 of `composeStrand`: declare the sApp's schema as `App` and apply it — a
|
|
7
8
|
* declarative diff against the catalog, so re-applying a schema that is already in place
|
|
8
9
|
* emits nothing. The one site that applies an `App` schema: `composeStrand` calls it at
|
|
9
|
-
* bring-up (through {@link
|
|
10
|
+
* bring-up (through {@link applyAppSchemaOrDefer}, whose deferred retry shares its
|
|
10
11
|
* declaration), and cadre-core's `StrandDatabase.attachAppSchema` calls it on a live storage
|
|
11
12
|
* replica when an app claims the strand. The database must already be composed (optimystic
|
|
12
13
|
* set as the default vtab), or the tables land in memory instead of the strand.
|
|
@@ -34,15 +35,24 @@ async function declareAppSchema(db, schema) {
|
|
|
34
35
|
assertNoSeedItems(db);
|
|
35
36
|
}
|
|
36
37
|
/**
|
|
37
|
-
* Step 7 of `composeStrand`: {@link applyAppSchema}, except that an apply refused
|
|
38
|
-
*
|
|
39
|
-
* throw. Quereus unwinds the refused apply, so `db` keeps the `App` schema it had; the apply is
|
|
40
|
-
* retried in the background each time `queue` drains, for as long as the queue is what refuses it,
|
|
41
|
-
* and `appSchema` settles with how that ended. Any other error from the first apply is thrown.
|
|
38
|
+
* Step 7 of `composeStrand`: {@link applyAppSchema}, except that an apply refused for a reason
|
|
39
|
+
* that passes does not throw. Two such reasons:
|
|
42
40
|
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* the
|
|
41
|
+
* - queued offline transactions wrote a table the apply changes (`QueuedEntriesBlockSchemaChangeError`);
|
|
42
|
+
* retried each time the queue drains;
|
|
43
|
+
* - the strand's cohort could not be reached (Optimystic's `classifyCommitFailure` says
|
|
44
|
+
* `cohort-unreachable`): an apply writes the strand's catalog, which needs the cohort, so a member
|
|
45
|
+
* alone after an app update would otherwise not open the strand at all (gotchoices/sereus#55).
|
|
46
|
+
* Retried when the strand node connects to a peer, and on a backoff ({@link COHORT_RETRY_MS}).
|
|
47
|
+
*
|
|
48
|
+
* Quereus unwinds a refused apply, whether a migration step or the closing catalog commit refused it,
|
|
49
|
+
* so `db` keeps the `App` schema it had, and `appSchema` settles with how the retries ended. Any other
|
|
50
|
+
* error from the first apply is thrown, and so is a refusal Quereus could not unwind that leaves a
|
|
51
|
+
* retry nothing to send ({@link retryableRefusalOf}).
|
|
52
|
+
*
|
|
53
|
+
* Waiting before returning was rejected: that withholds the strand from the app right after an app
|
|
54
|
+
* update, which is when a phone is most likely to be offline. So was refusing the connect: the queue
|
|
55
|
+
* can drain only while the composition is alive.
|
|
46
56
|
*
|
|
47
57
|
* `released` is aborted when the composition shuts down; a retry not yet landed then settles
|
|
48
58
|
* `cancelled`.
|
|
@@ -52,36 +62,38 @@ async function declareAppSchema(db, schema) {
|
|
|
52
62
|
* apply would be committed or rolled back with the app's rows, and a rollback leaves the index it
|
|
53
63
|
* built holding entries for rows that are gone.
|
|
54
64
|
*/
|
|
55
|
-
export async function
|
|
65
|
+
export async function applyAppSchemaOrDefer(db, schema, waits, released) {
|
|
56
66
|
try {
|
|
57
67
|
await applyAppSchema(db, schema);
|
|
58
68
|
log('sApp schema applied');
|
|
59
69
|
return { appSchema: Promise.resolve({ state: 'applied' }) };
|
|
60
70
|
}
|
|
61
71
|
catch (err) {
|
|
62
|
-
const
|
|
63
|
-
if (!
|
|
72
|
+
const deferral = await retryableRefusalOf(db, err);
|
|
73
|
+
if (!deferral) {
|
|
64
74
|
throw err;
|
|
65
75
|
}
|
|
66
|
-
|
|
76
|
+
logDeferral('sApp schema apply', deferral);
|
|
67
77
|
return {
|
|
68
|
-
appSchema:
|
|
69
|
-
|
|
78
|
+
appSchema: retryDeferredAppSchema(db, schema, deferral, waits, released),
|
|
79
|
+
appSchemaWaitingFor: deferral.wait,
|
|
80
|
+
...(deferral.wait === 'queue' && { appSchemaDeferredBy: deferral.transactionIds }),
|
|
70
81
|
};
|
|
71
82
|
}
|
|
72
83
|
}
|
|
73
|
-
async function
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
// as undrained, so no such state is known; if one shows up as a busy loop, back off between tries.
|
|
84
|
+
async function retryDeferredAppSchema(db, schema, first, waits, released) {
|
|
85
|
+
let deferral = first;
|
|
86
|
+
let cohortRetries = 0;
|
|
77
87
|
for (;;) {
|
|
78
88
|
try {
|
|
79
|
-
await
|
|
89
|
+
await nextChance(deferral, waits, cohortRetries, released);
|
|
90
|
+
if (deferral.wait === 'cohort') {
|
|
91
|
+
cohortRetries++;
|
|
92
|
+
}
|
|
80
93
|
if (released.aborted) {
|
|
81
94
|
return { state: 'cancelled' };
|
|
82
95
|
}
|
|
83
|
-
await
|
|
84
|
-
await db.exec('apply schema App;', undefined, { transaction: true });
|
|
96
|
+
await applyOutsideOpenTransaction(db, schema, released);
|
|
85
97
|
log('Deferred sApp schema applied');
|
|
86
98
|
return { state: 'applied', deferred: true };
|
|
87
99
|
}
|
|
@@ -90,29 +102,140 @@ async function retryAppSchemaAfterDrain(db, schema, queue, released) {
|
|
|
90
102
|
log('Deferred sApp schema apply cancelled by shutdown');
|
|
91
103
|
return { state: 'cancelled' };
|
|
92
104
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
await abortableDelay(OPEN_TRANSACTION_RETRY_MS, released);
|
|
96
|
-
continue;
|
|
97
|
-
}
|
|
98
|
-
const refusal = queueRefusalIn(err);
|
|
99
|
-
if (!refusal) {
|
|
105
|
+
const again = await retryableRefusalOf(db, err);
|
|
106
|
+
if (!again) {
|
|
100
107
|
log('Deferred sApp schema apply failed: %O', err);
|
|
101
108
|
return { state: 'failed', error: err };
|
|
102
109
|
}
|
|
103
|
-
|
|
110
|
+
logDeferral('Deferred sApp schema apply', again);
|
|
111
|
+
deferral = again;
|
|
104
112
|
}
|
|
105
113
|
}
|
|
106
114
|
}
|
|
107
|
-
/**
|
|
108
|
-
function
|
|
115
|
+
/** One atomic apply, once no other caller holds a transaction open. Throws the open-transaction refusal when `released` aborts during the wait. */
|
|
116
|
+
async function applyOutsideOpenTransaction(db, schema, released) {
|
|
117
|
+
for (;;) {
|
|
118
|
+
await declareAppSchema(db, schema);
|
|
119
|
+
try {
|
|
120
|
+
await db.exec('apply schema App;', undefined, { transaction: true });
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
catch (err) {
|
|
124
|
+
if (!(err instanceof TransactionActiveError)) {
|
|
125
|
+
throw err;
|
|
126
|
+
}
|
|
127
|
+
log('Deferred sApp schema apply waiting for an open transaction to end');
|
|
128
|
+
await abortableDelay(OPEN_TRANSACTION_RETRY_MS, released);
|
|
129
|
+
if (released.aborted) {
|
|
130
|
+
throw err;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
/** Waits for whatever may get the retry past `deferral`. */
|
|
136
|
+
async function nextChance(deferral, waits, cohortRetries, released) {
|
|
137
|
+
if (deferral.wait === 'queue' && waits.queue) {
|
|
138
|
+
// NOTE: this loops without a pause when `whenDrained` resolves at once while the refusal stands
|
|
139
|
+
// (a segment left sealed with nothing queued, say). Upstream counts a removal still in progress
|
|
140
|
+
// as undrained, so no such state is known; if one shows up as a busy loop, back off between tries.
|
|
141
|
+
await waits.queue.whenDrained();
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
await nextCohortChance(waits.peers, cohortRetryDelay(cohortRetries), released);
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* The refusal `err` is or wraps, when retrying it would send something. An apply refused after a
|
|
148
|
+
* `drop table` or `drop column` cannot be unwound, so `db` can already hold the whole new schema while
|
|
149
|
+
* the store holds the old one. A retry would then diff clean and settle `applied` with nothing written,
|
|
150
|
+
* so that refusal counts as a failure: a restart plans the change again from the store.
|
|
151
|
+
*/
|
|
152
|
+
async function retryableRefusalOf(db, err) {
|
|
153
|
+
const deferral = deferralOf(err);
|
|
154
|
+
if (!deferral) {
|
|
155
|
+
return undefined;
|
|
156
|
+
}
|
|
157
|
+
try {
|
|
158
|
+
if (await appSchemaHasPendingChanges(db)) {
|
|
159
|
+
return deferral;
|
|
160
|
+
}
|
|
161
|
+
log('sApp schema apply was refused, and the database already holds the new schema: %O', err);
|
|
162
|
+
}
|
|
163
|
+
catch (diffError) {
|
|
164
|
+
log('Could not check what a refused sApp schema apply left to send: %O', diffError);
|
|
165
|
+
}
|
|
166
|
+
return undefined;
|
|
167
|
+
}
|
|
168
|
+
async function appSchemaHasPendingChanges(db) {
|
|
169
|
+
for await (const _change of db.eval('diff schema App')) {
|
|
170
|
+
return true;
|
|
171
|
+
}
|
|
172
|
+
return false;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* The refusal `err` is or wraps, when a later retry can get past it: Quereus rewraps an error out of
|
|
176
|
+
* a migration step, keeping it as `cause`.
|
|
177
|
+
*
|
|
178
|
+
* `classifyCommitFailure` refuses to walk `cause` itself, because a commit-phase shortfall nested
|
|
179
|
+
* there means the write is in doubt rather than unsent. Walking it here is safe: an apply is a
|
|
180
|
+
* declarative diff, so a retry after a write that did land changes nothing.
|
|
181
|
+
*/
|
|
182
|
+
function deferralOf(err) {
|
|
109
183
|
for (let at = err; at instanceof Error; at = at.cause) {
|
|
110
184
|
if (at instanceof QueuedEntriesBlockSchemaChangeError) {
|
|
111
|
-
return at;
|
|
185
|
+
return { wait: 'queue', transactionIds: at.transactionIds };
|
|
186
|
+
}
|
|
187
|
+
if (classifyCommitFailure(at).kind === 'cohort-unreachable') {
|
|
188
|
+
return { wait: 'cohort' };
|
|
112
189
|
}
|
|
113
190
|
}
|
|
114
191
|
return undefined;
|
|
115
192
|
}
|
|
193
|
+
function logDeferral(what, deferral) {
|
|
194
|
+
if (deferral.wait === 'queue') {
|
|
195
|
+
log('%s refused by queued transactions %o; retrying once they settle', what, deferral.transactionIds);
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
log('%s could not reach the strand cohort; retrying when a peer connects', what);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Backoff for a retry waiting for the cohort, by how many came before it. A connect wakes the retry
|
|
203
|
+
* sooner, so the backoff only bounds how long a missed or too-early connect leaves the schema behind.
|
|
204
|
+
*/
|
|
205
|
+
const COHORT_RETRY_MS = [15000, 30000, 60000, 120000, 300000];
|
|
206
|
+
function cohortRetryDelay(retriesBefore) {
|
|
207
|
+
return COHORT_RETRY_MS[Math.min(retriesBefore, COHORT_RETRY_MS.length - 1)];
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* How long a retry woken by a connect waits first, so the peer is identified and in the ring before
|
|
211
|
+
* the apply asks for its cohort; a retry that still finds it missing waits for the next chance.
|
|
212
|
+
*/
|
|
213
|
+
const COHORT_CONNECT_SETTLE_MS = 2000;
|
|
214
|
+
/**
|
|
215
|
+
* Resolves {@link COHORT_CONNECT_SETTLE_MS} after the strand node's next peer connect, after `delayMs`, or when `signal` aborts.
|
|
216
|
+
*
|
|
217
|
+
* NOTE: every connect wakes a retry, the relay's included, and a retry that reaches the cohort's
|
|
218
|
+
* refusal holds the database's statement lock while it waits for it. If that shows up as stalled app
|
|
219
|
+
* statements on a node with many connects, wake only on a connect to a strand member.
|
|
220
|
+
*/
|
|
221
|
+
async function nextCohortChance(peers, delayMs, signal) {
|
|
222
|
+
const byConnect = await new Promise(resolve => {
|
|
223
|
+
const done = (connected) => {
|
|
224
|
+
clearTimeout(timer);
|
|
225
|
+
peers?.removeEventListener('peer:connect', onConnect);
|
|
226
|
+
signal.removeEventListener('abort', onAbort);
|
|
227
|
+
resolve(connected);
|
|
228
|
+
};
|
|
229
|
+
const onConnect = () => done(true);
|
|
230
|
+
const onAbort = () => done(false);
|
|
231
|
+
const timer = setTimeout(() => done(false), delayMs);
|
|
232
|
+
peers?.addEventListener('peer:connect', onConnect);
|
|
233
|
+
signal.addEventListener('abort', onAbort, { once: true });
|
|
234
|
+
});
|
|
235
|
+
if (byConnect) {
|
|
236
|
+
await abortableDelay(COHORT_CONNECT_SETTLE_MS, signal);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
116
239
|
/** How long a deferred sApp schema apply waits before trying again while another caller's transaction is open. */
|
|
117
240
|
const OPEN_TRANSACTION_RETRY_MS = 250;
|
|
118
241
|
/** Resolves after `ms`, or as soon as `signal` aborts. */
|
package/dist/app-schema.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-schema.js","sourceRoot":"","sources":["../src/app-schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAiB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"app-schema.js","sourceRoot":"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,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,gBAAgB,CAAC,CAAC,MAAM,CAAC;IAC3F,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;QACjB,oEAAoE;QACpE,MAAM,IAAI,KAAK,CAAC,mBAAmB,OAAO,oNAAoN,CAAC,CAAC;IACjQ,CAAC;AACF,CAAC;AAED,SAAS,iBAAiB,CAAC,EAAY;IACtC,uFAAuF;IACvF,MAAM,MAAM,GAAG,gBAAgB,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC1G,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CAAC,6CAA6C,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,8HAA8H,CAAC,CAAC;IAC/M,CAAC;AACF,CAAC"}
|
package/dist/cached-storage.d.ts
CHANGED
|
@@ -29,7 +29,9 @@
|
|
|
29
29
|
* backend, which is the invariant's other half.
|
|
30
30
|
*
|
|
31
31
|
* `MemoryRawStorage` is returned unwrapped on upstream's own guidance: the backend
|
|
32
|
-
* is already in-memory, so the cache adds bookkeeping with nothing to save.
|
|
32
|
+
* is already in-memory, so the cache adds bookkeeping with nothing to save. So is a
|
|
33
|
+
* storage that reports `readCached` with a cache of its own (React Native's
|
|
34
|
+
* `LevelDBRawStorage`), which upstream refuses to have wrapped again.
|
|
33
35
|
*
|
|
34
36
|
* **{@link wrapStorageWithCache} and {@link disposeStorageCache} are a matched pair
|
|
35
37
|
* with a holder count between them.** Every wrap that hands back a cache this module
|
package/dist/cached-storage.js
CHANGED
|
@@ -29,7 +29,9 @@
|
|
|
29
29
|
* backend, which is the invariant's other half.
|
|
30
30
|
*
|
|
31
31
|
* `MemoryRawStorage` is returned unwrapped on upstream's own guidance: the backend
|
|
32
|
-
* is already in-memory, so the cache adds bookkeeping with nothing to save.
|
|
32
|
+
* is already in-memory, so the cache adds bookkeeping with nothing to save. So is a
|
|
33
|
+
* storage that reports `readCached` with a cache of its own (React Native's
|
|
34
|
+
* `LevelDBRawStorage`), which upstream refuses to have wrapped again.
|
|
33
35
|
*
|
|
34
36
|
* **{@link wrapStorageWithCache} and {@link disposeStorageCache} are a matched pair
|
|
35
37
|
* with a holder count between them.** Every wrap that hands back a cache this module
|
|
@@ -86,6 +88,14 @@ function addHolder(wrapped) {
|
|
|
86
88
|
claim.holders += 1;
|
|
87
89
|
}
|
|
88
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* A storage that carries its own read cache and is not one of this module's wrappers, such as
|
|
93
|
+
* the React Native `LevelDBRawStorage`. Upstream refuses a second cache over it
|
|
94
|
+
* (`redundant read cache`), and it stays its creator's to close.
|
|
95
|
+
*/
|
|
96
|
+
function isOwnReadCache(storage) {
|
|
97
|
+
return storage.readCached === true && !(storage instanceof CachedRawStorage);
|
|
98
|
+
}
|
|
89
99
|
/**
|
|
90
100
|
* The cached view of `storage`, memoized per instance, with one holder claim taken for
|
|
91
101
|
* this caller — release it with {@link disposeStorageCache} when this caller's scope
|
|
@@ -94,7 +104,7 @@ function addHolder(wrapped) {
|
|
|
94
104
|
* one backend is the failure that matters and a stale pool label is not.
|
|
95
105
|
*/
|
|
96
106
|
export function wrapStorageWithCache(storage, label) {
|
|
97
|
-
if (storage instanceof MemoryRawStorage) {
|
|
107
|
+
if (storage instanceof MemoryRawStorage || isOwnReadCache(storage)) {
|
|
98
108
|
return storage;
|
|
99
109
|
}
|
|
100
110
|
if (storage instanceof CachedRawStorage) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cached-storage.js","sourceRoot":"","sources":["../src/cached-storage.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"cached-storage.js","sourceRoot":"","sources":["../src/cached-storage.ts"],"names":[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AAC,CAAC;QACpB,OAAO,QAAQ,CAAC;IACjB,CAAC;IACD,MAAM,OAAO,GAAG,IAAI,gBAAgB,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;IAChE,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC5B,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;IACpD,OAAO,OAAO,CAAC;AAChB,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,OAAoB;IAC7D,IAAI,CAAC,CAAC,OAAO,YAAY,gBAAgB,CAAC,EAAE,CAAC;QAC5C,OAAO;IACR,CAAC;IACD,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAClC,IAAI,CAAC,KAAK,EAAE,CAAC;QACZ,OAAO;IACR,CAAC;IACD,kFAAkF;IAClF,oFAAoF;IACpF,mEAAmE;IACnE,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;IACnB,IAAI,KAAK,CAAC,OAAO,GAAG,CAAC,EAAE,CAAC;QACvB,OAAO;IACR,CAAC;IACD,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACvB,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC1B,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;AACzB,CAAC"}
|
package/dist/compose-strand.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import debug from 'debug';
|
|
2
2
|
import optimysticPlugin from '@optimystic/quereus-plugin-optimystic/plugin';
|
|
3
|
-
import {
|
|
3
|
+
import { applyAppSchemaOrDefer } from './app-schema.js';
|
|
4
4
|
import { STRAND_SCHEMA } from './strand-schema.js';
|
|
5
5
|
import { resolveStrandClusterSize, STRAND_CLUSTER_POLICY } from './cluster-size.js';
|
|
6
6
|
import { wrapStorageWithCache, disposeStorageCache } from './cached-storage.js';
|
|
@@ -151,6 +151,8 @@ export async function composeStrand(db, options, platform) {
|
|
|
151
151
|
const released = new AbortController();
|
|
152
152
|
let appSchemaApply;
|
|
153
153
|
let createdNode = null;
|
|
154
|
+
// The strand node, when there is one: a deferred sApp schema apply waiting for the cohort wakes on its connects.
|
|
155
|
+
let peers;
|
|
154
156
|
let hydrated;
|
|
155
157
|
try {
|
|
156
158
|
// 3. Acquire the libp2p node. Skip only when this is the unit-test fake
|
|
@@ -186,6 +188,7 @@ export async function composeStrand(db, options, platform) {
|
|
|
186
188
|
coordinatedRepo = repo;
|
|
187
189
|
log('Created libp2p node (port: %d, fretProfile: %s, storage=%s)', port, fretProfile, !!storage);
|
|
188
190
|
}
|
|
191
|
+
peers = node;
|
|
189
192
|
collectionFactory.registerLibp2pNode(networkName, node, coordinatedRepo);
|
|
190
193
|
log('Registered libp2p node with collection factory');
|
|
191
194
|
}
|
|
@@ -250,12 +253,12 @@ export async function composeStrand(db, options, platform) {
|
|
|
250
253
|
// migrated instead of restored. No schema in this repo evolves that way, so this
|
|
251
254
|
// is a note for whoever first ships a migration that does.
|
|
252
255
|
//
|
|
253
|
-
// The
|
|
254
|
-
//
|
|
255
|
-
//
|
|
256
|
+
// The exception: an apply refused by queued offline transactions, or because the strand's
|
|
257
|
+
// cohort could not be reached, does not fail the connect, and is retried as the queue drains
|
|
258
|
+
// or when a peer connects. See `applyAppSchemaOrDefer`, including what `db` holds meanwhile.
|
|
256
259
|
if (schema) {
|
|
257
260
|
log('Applying sApp schema for strand %s', strandId);
|
|
258
|
-
appSchemaApply = await
|
|
261
|
+
appSchemaApply = await applyAppSchemaOrDefer(db, schema, { queue: pluginResult.offline, peers }, released.signal);
|
|
259
262
|
}
|
|
260
263
|
}
|
|
261
264
|
catch (err) {
|
|
@@ -330,6 +333,9 @@ async function registerStrandPlugins(db, platform, strand) {
|
|
|
330
333
|
const storage = strand.storage;
|
|
331
334
|
pluginConfig.rawStorageFactory = () => storage;
|
|
332
335
|
}
|
|
336
|
+
// NOTE: `cost_profile` is left at upstream's default, `distributed` on the network transactor. A
|
|
337
|
+
// strand keeps each block on `DEFAULT_STRAND_CLUSTER_SIZE` machines, so in a larger party a read
|
|
338
|
+
// can leave the machine; a smaller one pays planner overhead, never a wrong result.
|
|
333
339
|
// NOTE: `networkCommitTimeoutMs` is left at upstream's default (five minutes); nothing was
|
|
334
340
|
// measured to choose another. A network-acknowledged commit made while transactions are queued
|
|
335
341
|
// (any `Strand` write, all of them tagged 'network') waits that long behind them holding
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose-strand.js","sourceRoot":"","sources":["../src/compose-strand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,gBAAgB,MAAM,8CAA8C,CAAC;AAS5E,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"compose-strand.js","sourceRoot":"","sources":["../src/compose-strand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,gBAAgB,MAAM,8CAA8C,CAAC;AAS5E,OAAO,EAAE,qBAAqB,EAA+C,MAAM,iBAAiB,CAAC;AACrG,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AACpF,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,sBAAsB,EAAiC,MAAM,wBAAwB,CAAC;AAE/F,MAAM,GAAG,GAAG,KAAK,CAAC,sBAAsB,CAAC,CAAC;AAC1C,MAAM,MAAM,GAAG,KAAK,CAAC,6BAA6B,CAAC,CAAC;AAEpD,wGAAwG;AACxG,MAAM,eAAe,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAU,CAAC;AAEnD,yGA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MAAM,CAAC,OAAO,EAAE,CAAC;QAC7D,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;QAC/B,YAAY,CAAC,iBAAiB,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC;IAChD,CAAC;IACD,iGAAiG;IACjG,iGAAiG;IACjG,oFAAoF;IACpF,2FAA2F;IAC3F,+FAA+F;IAC/F,yFAAyF;IACzF,8FAA8F;IAC9F,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,YAAY,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;IACvC,CAAC;IACD,mFAAmF;IACnF,qFAAqF;IACrF,+DAA+D;IAC/D,MAAM,YAAY,GAAG,gBAAgB,CACpC,EAAE,EACF,YAAiE,CAC5B,CAAC;IACvC,kBAAkB,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC;IACrC,GAAG,CAAC,6CAA6C,CAAC,CAAC;IACnD,OAAO,YAAY,CAAC;AACrB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { applyAppSchema } from './app-schema.js';
|
|
|
4
4
|
export { createEmptyCollections, type CollectionRegistrySource } from './empty-collections.js';
|
|
5
5
|
export { MIN_CLUSTER_SIZE, COHORT_READ_DEADLINE_MS, CONTROL_REPLICATION_BREADTH, CONTROL_CLUSTER_POLICY, DEFAULT_STRAND_CLUSTER_SIZE, STRAND_CLUSTER_POLICY, resolveStrandClusterSize, resolveRepairYardstick, controlClusterPolicy, strandClusterPolicy } from './cluster-size.js';
|
|
6
6
|
export { wrapStorageWithCache, disposeStorageCache } from './cached-storage.js';
|
|
7
|
-
export type { StrandConnectionOptions, SereusPluginResult, StrandTransactor, StrandOfflineOptions, StrandOfflineController, AppSchemaOutcome, } from './types.js';
|
|
7
|
+
export type { StrandConnectionOptions, SereusPluginResult, StrandTransactor, StrandOfflineOptions, StrandOfflineController, AppSchemaOutcome, AppSchemaWait, } from './types.js';
|
|
8
8
|
export type { SqlCommitDurability, CommitFullyHeld } from '@optimystic/quereus-plugin-optimystic/plugin';
|
|
9
9
|
export { OfflineCommitTimeoutError, QueuedEntriesBlockSchemaChangeError, EntryNotDiscardableError, UnknownEntryError, QueueDisposedError, OfflineJournalError, } from '@optimystic/quereus-plugin-optimystic/plugin';
|
|
10
10
|
export type { QueuedTransactionStatus, OfflineModeState, CommitOutlook } from '@optimystic/quereus-plugin-optimystic/plugin';
|