effect-dynamodb 1.37.0 → 1.39.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/Aggregate.d.ts.map +1 -1
- package/dist/Aggregate.js +312 -338
- package/dist/Aggregate.js.map +1 -1
- package/dist/Batch.d.ts.map +1 -1
- package/dist/Batch.js +72 -191
- package/dist/Batch.js.map +1 -1
- package/dist/Collection.d.ts.map +1 -1
- package/dist/Collection.js +15 -16
- package/dist/Collection.js.map +1 -1
- package/dist/DynamoClient.d.ts +28 -13
- package/dist/DynamoClient.d.ts.map +1 -1
- package/dist/DynamoClient.js +64 -86
- package/dist/DynamoClient.js.map +1 -1
- package/dist/Entity.d.ts +9 -84
- package/dist/Entity.d.ts.map +1 -1
- package/dist/Entity.js +1094 -2682
- package/dist/Entity.js.map +1 -1
- package/dist/EventStore.d.ts +10 -10
- package/dist/EventStore.d.ts.map +1 -1
- package/dist/EventStore.js +181 -291
- package/dist/EventStore.js.map +1 -1
- package/dist/Query.d.ts +70 -32
- package/dist/Query.d.ts.map +1 -1
- package/dist/Query.js +501 -80
- package/dist/Query.js.map +1 -1
- package/dist/Table.d.ts +8 -2
- package/dist/Table.d.ts.map +1 -1
- package/dist/Table.js +7 -0
- package/dist/Table.js.map +1 -1
- package/dist/Transaction.d.ts +2 -18
- package/dist/Transaction.d.ts.map +1 -1
- package/dist/Transaction.js +1 -58
- package/dist/Transaction.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/internal/BoundQuery.d.ts +11 -8
- package/dist/internal/BoundQuery.d.ts.map +1 -1
- package/dist/internal/BoundQuery.js +6 -2
- package/dist/internal/BoundQuery.js.map +1 -1
- package/dist/internal/Cursor.d.ts +9 -4
- package/dist/internal/Cursor.d.ts.map +1 -1
- package/dist/internal/Cursor.js +12 -2
- package/dist/internal/Cursor.js.map +1 -1
- package/dist/internal/ProjectionEngine.d.ts +2 -16
- package/dist/internal/ProjectionEngine.d.ts.map +1 -1
- package/dist/internal/ProjectionEngine.js +44 -229
- package/dist/internal/ProjectionEngine.js.map +1 -1
- package/dist/internal/RangePlanner.d.ts +0 -76
- package/dist/internal/RangePlanner.d.ts.map +1 -1
- package/dist/internal/RangePlanner.js +2 -206
- package/dist/internal/RangePlanner.js.map +1 -1
- package/dist/internal/Rekey.d.ts +28 -6
- package/dist/internal/Rekey.d.ts.map +1 -1
- package/dist/internal/Rekey.js +46 -10
- package/dist/internal/Rekey.js.map +1 -1
- package/dist/internal/ShardMerge.d.ts +83 -0
- package/dist/internal/ShardMerge.d.ts.map +1 -0
- package/dist/internal/ShardMerge.js +182 -0
- package/dist/internal/ShardMerge.js.map +1 -0
- package/dist/internal/TransactPlan.d.ts +1 -8
- package/dist/internal/TransactPlan.d.ts.map +1 -1
- package/dist/internal/TransactPlan.js +2 -9
- package/dist/internal/TransactPlan.js.map +1 -1
- package/dist/internal/TransactWriteOps.d.ts +6 -9
- package/dist/internal/TransactWriteOps.d.ts.map +1 -1
- package/dist/internal/TransactWriteOps.js +3 -79
- package/dist/internal/TransactWriteOps.js.map +1 -1
- package/dist/internal/TransactableOps.d.ts +10 -8
- package/dist/internal/TransactableOps.d.ts.map +1 -1
- package/dist/internal/TransactableOps.js +18 -14
- package/dist/internal/TransactableOps.js.map +1 -1
- package/package.json +7 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectionEngine.d.ts","sourceRoot":"","sources":["../../src/internal/ProjectionEngine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;
|
|
1
|
+
{"version":3,"file":"ProjectionEngine.d.ts","sourceRoot":"","sources":["../../src/internal/ProjectionEngine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,OAAO,EACL,sBAAsB,EACtB,KAAK,sBAAsB,EAI3B,eAAe,EAChB,MAAM,mC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AAE,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAGpB,CAAA;AAEzC,wCAAwC;AACxC,eAAO,MAAM,aAAa,GACxB,OAAO,MAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,sBAAsB,CAAC,GAAG,SAAS,KAC7E,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAKgB,CAAA;AAErD,YAAY,EAAE,sBAAsB,EAAE,CAAA"}
|
|
@@ -23,7 +23,6 @@ import { fromAttributeMap, toAttributeMap } from "../Marshaller.js";
|
|
|
23
23
|
import { resolveTtlAttributeName } from "../Table.js";
|
|
24
24
|
import * as Capacity from "./Capacity.js";
|
|
25
25
|
import { condition as entityCondition } from "./EntityCombinators.js";
|
|
26
|
-
import { asReadGuard } from "./ExpressionLimits.js";
|
|
27
26
|
import { OUTBOX_CLAIM as CLAIM_TOKEN, OUTBOX_CLAIMED_UNTIL as CLAIMED_UNTIL, composePrimaryKey, generateTimestampPrimitive, KEY_TEXT, OUTBOX_ROW_PK as ROW_PK, OUTBOX_ROW_SK as ROW_SK, validateAndBuildPutItem, } from "./TransactableOps.js";
|
|
28
27
|
// ---------------------------------------------------------------------------
|
|
29
28
|
// Removal (#154)
|
|
@@ -141,40 +140,17 @@ export const makeEngine = (config) => {
|
|
|
141
140
|
};
|
|
142
141
|
}
|
|
143
142
|
const tableName = Effect.suspend(() => Effect.map(readModel._tableTag, (tc) => tc.name));
|
|
144
|
-
/**
|
|
145
|
-
* The row, read strongly consistent — raw, so a tombstone reads as one. A
|
|
146
|
-
* row 1.36 wrote under a key whose text changed (#171) is read there when
|
|
147
|
-
* its current key holds none, as the read model's own reads do: judged by
|
|
148
|
-
* its values (`_ownsRow136`; a tombstone, which holds none, by its key and
|
|
149
|
-
* `KEY_TEXT`), another value's 1.36 row at the current key is no row, nor
|
|
150
|
-
* is that value's current row at the 1.36 key. A row found at its 1.36 key
|
|
151
|
-
* carries it (`at136`), so the write moves it.
|
|
152
|
-
*/
|
|
143
|
+
/** The row, read strongly consistent — raw, so a tombstone reads as one. */
|
|
153
144
|
const readRow = (key) => Effect.gen(function* () {
|
|
154
145
|
const client = yield* Capacity.client;
|
|
155
146
|
const TableName = yield* tableName;
|
|
156
|
-
const
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
let item = yield* read(current);
|
|
162
|
-
if (item !== undefined && !readModel._ownsRow136(rowKey, current, item))
|
|
163
|
-
item = undefined;
|
|
164
|
-
let at136;
|
|
165
|
-
if (item === undefined) {
|
|
166
|
-
const old = readModel._primaryKey136(rowKey);
|
|
167
|
-
if (old !== undefined) {
|
|
168
|
-
const held = yield* read(old);
|
|
169
|
-
if (held !== undefined && readModel._ownsRow136(rowKey, old, held)) {
|
|
170
|
-
item = held;
|
|
171
|
-
at136 = old;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
147
|
+
const { Item: item } = yield* client.getItem({
|
|
148
|
+
TableName,
|
|
149
|
+
Key: toAttributeMap(composePrimaryKey(readModel, key)),
|
|
150
|
+
ConsistentRead: true,
|
|
151
|
+
});
|
|
175
152
|
if (item === undefined)
|
|
176
153
|
return Option.none();
|
|
177
|
-
const moving = at136 === undefined ? {} : { at136, stored: item };
|
|
178
154
|
if (item.__edd_e__?.S === tombstoneMarker(entityType)) {
|
|
179
155
|
const raw = fromAttributeMap(item);
|
|
180
156
|
const values = {};
|
|
@@ -183,7 +159,7 @@ export const makeEngine = (config) => {
|
|
|
183
159
|
if (v !== undefined)
|
|
184
160
|
values[f] = v;
|
|
185
161
|
}
|
|
186
|
-
return Option.some({ values, tombstone: true, createdAt: undefined
|
|
162
|
+
return Option.some({ values, tombstone: true, createdAt: undefined });
|
|
187
163
|
}
|
|
188
164
|
const decoded = (yield* decodeMarshalledItem(readModel, item));
|
|
189
165
|
let values = decoded;
|
|
@@ -197,7 +173,6 @@ export const makeEngine = (config) => {
|
|
|
197
173
|
values: readModel._attachPrototype?.(values) ?? values,
|
|
198
174
|
tombstone: false,
|
|
199
175
|
createdAt: createdAtField === null ? undefined : decoded[createdAtField],
|
|
200
|
-
...moving,
|
|
201
176
|
});
|
|
202
177
|
});
|
|
203
178
|
/**
|
|
@@ -352,7 +327,7 @@ export const makeEngine = (config) => {
|
|
|
352
327
|
? { pk: primary.pk.field, sk: primary.sk.field }
|
|
353
328
|
: { pk: config.outbox.pk, sk: config.outbox.sk };
|
|
354
329
|
const pad = (n, width) => String(n).padStart(width, "0");
|
|
355
|
-
const outboxItems = (rowKey, revision, enqueued,
|
|
330
|
+
const outboxItems = (rowKey, revision, enqueued, mark) => Effect.forEach(enqueued, (e, i) => Effect.gen(function* () {
|
|
356
331
|
const outbox = config.outbox;
|
|
357
332
|
const encoded = yield* S.encodeUnknownEffect(outbox.schema)(e.effect).pipe(Effect.mapError((cause) => new ValidationError({ entityType, operation: `${config.label}.outbox`, cause })));
|
|
358
333
|
const keys = outboxKeys();
|
|
@@ -370,7 +345,7 @@ export const makeEngine = (config) => {
|
|
|
370
345
|
streamId: e.event.streamId,
|
|
371
346
|
version: e.event.version,
|
|
372
347
|
eventType: e.event.eventType,
|
|
373
|
-
...(
|
|
348
|
+
...(mark !== undefined && { [KEY_TEXT]: mark }),
|
|
374
349
|
};
|
|
375
350
|
if (outbox.index !== undefined) {
|
|
376
351
|
item[outbox.index.pk] = outboxMarker(entityType);
|
|
@@ -378,10 +353,7 @@ export const makeEngine = (config) => {
|
|
|
378
353
|
}
|
|
379
354
|
return toAttributeMap(item);
|
|
380
355
|
}));
|
|
381
|
-
/**
|
|
382
|
-
* A lost race, from a single write's or a transaction's failure: the row's
|
|
383
|
-
* Put, or — moving it from its 1.36 key — that row's Delete, cancelled.
|
|
384
|
-
*/
|
|
356
|
+
/** A lost race, from a single write's or a transaction's failure: the row's Put cancelled. */
|
|
385
357
|
const lostRaceOf = (error, transaction) => {
|
|
386
358
|
const cause = error?.cause;
|
|
387
359
|
if (!transaction)
|
|
@@ -396,15 +368,11 @@ export const makeEngine = (config) => {
|
|
|
396
368
|
const rowKey = composePrimaryKey(readModel, key);
|
|
397
369
|
const condition = guard(row);
|
|
398
370
|
const createdAt = Option.isSome(row) ? row.value.createdAt : undefined;
|
|
399
|
-
// A tombstone or outbox item holds no values
|
|
400
|
-
//
|
|
401
|
-
//
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
// The row's item: the entity's own `put` (no outbox), or built for a
|
|
405
|
-
// transaction. A row over a tombstone under a key whose text changed is
|
|
406
|
-
// built too: the entity's `put` would judge the tombstone by values it
|
|
407
|
-
// doesn't hold, and moves it unmarked from its 1.36 key (#171).
|
|
371
|
+
// A tombstone or outbox item holds no values, so its key alone says which text it is for
|
|
372
|
+
// `rekey` (`KEY_TEXT`): one under the text of `escapeKeys: true`, where that isn't off's, is
|
|
373
|
+
// marked.
|
|
374
|
+
const mark = readModel._keyTextMark(key);
|
|
375
|
+
// The row's item: the entity's own `put` (no outbox), or built for a transaction.
|
|
408
376
|
let rowItem;
|
|
409
377
|
if (Option.isNone(target)) {
|
|
410
378
|
// A tombstone: the key, the kept checkpoint fields, the revision.
|
|
@@ -414,7 +382,7 @@ export const makeEngine = (config) => {
|
|
|
414
382
|
...rowKey,
|
|
415
383
|
__edd_e__: tombstoneMarker(entityType),
|
|
416
384
|
[REMOVED_AT]: DateTime.formatIso(now),
|
|
417
|
-
...(
|
|
385
|
+
...(mark !== undefined && { [KEY_TEXT]: mark }),
|
|
418
386
|
};
|
|
419
387
|
for (const [f, v] of Object.entries(kept))
|
|
420
388
|
tomb[dbName(f)] = v;
|
|
@@ -423,10 +391,7 @@ export const makeEngine = (config) => {
|
|
|
423
391
|
}
|
|
424
392
|
rowItem = toAttributeMap(tomb);
|
|
425
393
|
}
|
|
426
|
-
else if (enqueued.length > 0
|
|
427
|
-
(Option.isSome(row) &&
|
|
428
|
-
row.value.tombstone &&
|
|
429
|
-
readModel._primaryKey136(key) !== undefined)) {
|
|
394
|
+
else if (enqueued.length > 0) {
|
|
430
395
|
const built = yield* validateAndBuildPutItem(readModel, target.value, `${config.label}.write`);
|
|
431
396
|
const item = { ...built.item };
|
|
432
397
|
if (createdAtField !== null && DateTime.isDateTime(createdAt)) {
|
|
@@ -452,86 +417,29 @@ export const makeEngine = (config) => {
|
|
|
452
417
|
const written = yield* run.pipe(Effect.catchTag("ConditionalCheckFailed", () => Effect.fail(new LostRace(key))));
|
|
453
418
|
return Option.some(written);
|
|
454
419
|
}
|
|
455
|
-
|
|
456
|
-
// current key, where nothing may be, and deleted at its 1.36 key only
|
|
457
|
-
// while it is as read. Another value's 1.36 row at the current key fails
|
|
458
|
-
// a write that expects nothing there: it is moved out of the way, as the
|
|
459
|
-
// entity's own writes move it, and the write is read again. So is
|
|
460
|
-
// another value's outbox item 1.36 left where one of this write's goes:
|
|
461
|
-
// a key that reads back as another value's 1.36 key can hold them, so
|
|
462
|
-
// there each Put requires its key empty.
|
|
463
|
-
const at136 = Option.isSome(row) ? row.value.at136 : undefined;
|
|
464
|
-
const OutboxTable = yield* outboxTable;
|
|
465
|
-
const keys = outboxKeys();
|
|
466
|
-
const sharedKey = typeof readModel._currentKeyOf136(rowKey) === "object";
|
|
467
|
-
const moved = at136 === undefined
|
|
468
|
-
? []
|
|
469
|
-
: [
|
|
470
|
-
{
|
|
471
|
-
Delete: {
|
|
472
|
-
TableName,
|
|
473
|
-
Key: toAttributeMap(at136),
|
|
474
|
-
...asReadGuard(row.value.stored, primary.pk.field, config.revision === undefined ? [] : [dbName(config.revision.field)]),
|
|
475
|
-
},
|
|
476
|
-
},
|
|
477
|
-
];
|
|
478
|
-
const outboxAt = 1 + moved.length;
|
|
479
|
-
const lostRace = (error, transaction) => lostRaceOf(error, transaction)
|
|
480
|
-
? Effect.gen(function* () {
|
|
481
|
-
if (Option.isNone(row) || at136 !== undefined) {
|
|
482
|
-
yield* readModel._clearAlias136(key, config.label);
|
|
483
|
-
}
|
|
484
|
-
const reasons = transaction
|
|
485
|
-
? (error.cause
|
|
486
|
-
?.CancellationReasons ?? [])
|
|
487
|
-
: [];
|
|
488
|
-
for (const reason of reasons.slice(outboxAt)) {
|
|
489
|
-
if (reason?.Code === "ConditionalCheckFailed" && reason.Item !== undefined) {
|
|
490
|
-
yield* readModel._displaceValueless136(OutboxTable, keys, reason.Item, config.label);
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
return yield* Effect.fail(new LostRace(key));
|
|
494
|
-
})
|
|
495
|
-
: Effect.fail(error);
|
|
420
|
+
const lostRace = (error, transaction) => Effect.fail(lostRaceOf(error, transaction) ? new LostRace(key) : error);
|
|
496
421
|
const rowPut = {
|
|
497
422
|
Put: {
|
|
498
423
|
TableName,
|
|
499
424
|
Item: rowItem,
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
? { ExpressionAttributeValues: condition.raw.values }
|
|
506
|
-
: {}),
|
|
507
|
-
}
|
|
508
|
-
: {
|
|
509
|
-
ConditionExpression: "attribute_not_exists(#g)",
|
|
510
|
-
ExpressionAttributeNames: { "#g": primary.pk.field },
|
|
511
|
-
}),
|
|
425
|
+
ConditionExpression: condition.raw.expression,
|
|
426
|
+
ExpressionAttributeNames: condition.raw.names,
|
|
427
|
+
...(Object.keys(condition.raw.values).length > 0
|
|
428
|
+
? { ExpressionAttributeValues: condition.raw.values }
|
|
429
|
+
: {}),
|
|
512
430
|
},
|
|
513
431
|
};
|
|
514
|
-
if (enqueued.length === 0
|
|
432
|
+
if (enqueued.length === 0) {
|
|
515
433
|
yield* client.putItem(rowPut.Put).pipe(Effect.catch((error) => lostRace(error, false)));
|
|
516
434
|
}
|
|
517
435
|
else {
|
|
518
|
-
const
|
|
436
|
+
const OutboxTable = yield* outboxTable;
|
|
437
|
+
const items = yield* outboxItems(rowKey, revision ?? 0, enqueued, mark);
|
|
519
438
|
yield* client
|
|
520
439
|
.transactWriteItems({
|
|
521
440
|
TransactItems: [
|
|
522
441
|
rowPut,
|
|
523
|
-
...
|
|
524
|
-
...items.map((Item) => ({
|
|
525
|
-
Put: {
|
|
526
|
-
TableName: OutboxTable,
|
|
527
|
-
Item,
|
|
528
|
-
...(sharedKey && {
|
|
529
|
-
ConditionExpression: "attribute_not_exists(#opk)",
|
|
530
|
-
ExpressionAttributeNames: { "#opk": keys.pk },
|
|
531
|
-
ReturnValuesOnConditionCheckFailure: "ALL_OLD",
|
|
532
|
-
}),
|
|
533
|
-
},
|
|
534
|
-
})),
|
|
442
|
+
...items.map((Item) => ({ Put: { TableName: OutboxTable, Item } })),
|
|
535
443
|
],
|
|
536
444
|
})
|
|
537
445
|
.pipe(Effect.catch((error) => lostRace(error, true)));
|
|
@@ -889,65 +797,30 @@ export const makeEngine = (config) => {
|
|
|
889
797
|
out[f] = target[f];
|
|
890
798
|
return out;
|
|
891
799
|
};
|
|
800
|
+
// -------------------------------------------------------------------------
|
|
801
|
+
// Outbox drain (#155)
|
|
802
|
+
// -------------------------------------------------------------------------
|
|
892
803
|
/**
|
|
893
804
|
* Deliver a row's pending effects in order: claim the head item, deliver it,
|
|
894
805
|
* delete it, repeat. A claim another drainer holds stops the drain; a crash
|
|
895
806
|
* leaves a claim that expires, so the effect is delivered again.
|
|
896
|
-
*
|
|
897
|
-
* `rows` are the keys the row's items are under: its current key, and its
|
|
898
|
-
* 1.36 key when its items can still be there (#171). The head is the first
|
|
899
|
-
* pending item of them all, by revision and position, so a row's effects
|
|
900
|
-
* are delivered in one order wherever they are.
|
|
901
807
|
*/
|
|
902
|
-
const drainRaw = (
|
|
808
|
+
const drainRaw = (rowPk, rowSk, deliver) => Effect.gen(function* () {
|
|
903
809
|
const outbox = config.outbox;
|
|
904
810
|
const client = yield* Capacity.client;
|
|
905
811
|
const TableName = yield* outboxTable;
|
|
906
812
|
const keys = outboxKeys();
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
const
|
|
813
|
+
let delivered = 0;
|
|
814
|
+
while (true) {
|
|
815
|
+
const page = yield* client.query({
|
|
910
816
|
TableName,
|
|
911
817
|
KeyConditionExpression: "#pk = :pk AND begins_with(#sk, :sk)",
|
|
912
|
-
ExpressionAttributeNames: {
|
|
913
|
-
|
|
914
|
-
"#sk": keys.sk,
|
|
915
|
-
...(at.only !== undefined && { "#kt": KEY_TEXT }),
|
|
916
|
-
},
|
|
917
|
-
ExpressionAttributeValues: toAttributeMap({ ":pk": at.pk, ":sk": `${at.sk}#outbox#` }),
|
|
818
|
+
ExpressionAttributeNames: { "#pk": keys.pk, "#sk": keys.sk },
|
|
819
|
+
ExpressionAttributeValues: toAttributeMap({ ":pk": rowPk, ":sk": `${rowSk}#outbox#` }),
|
|
918
820
|
ConsistentRead: true,
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
}
|
|
923
|
-
// Read past another row's items under the same key.
|
|
924
|
-
let start;
|
|
925
|
-
do {
|
|
926
|
-
const page = yield* client.query({
|
|
927
|
-
...request,
|
|
928
|
-
FilterExpression: at.only === "marked" ? "attribute_exists(#kt)" : "attribute_not_exists(#kt)",
|
|
929
|
-
...(start !== undefined && { ExclusiveStartKey: start }),
|
|
930
|
-
});
|
|
931
|
-
const first = page.Items?.[0];
|
|
932
|
-
if (first !== undefined)
|
|
933
|
-
return first;
|
|
934
|
-
start = page.LastEvaluatedKey;
|
|
935
|
-
} while (start !== undefined);
|
|
936
|
-
return undefined;
|
|
937
|
-
});
|
|
938
|
-
let delivered = 0;
|
|
939
|
-
while (true) {
|
|
940
|
-
let head;
|
|
941
|
-
let headAt = "";
|
|
942
|
-
for (const at of rows) {
|
|
943
|
-
const first = yield* firstAt(at);
|
|
944
|
-
// `#outbox#<revision>#<n>`: fixed widths, so text order is delivery order.
|
|
945
|
-
const suffix = first?.[keys.sk]?.S?.slice(at.sk.length) ?? "";
|
|
946
|
-
if (first !== undefined && (head === undefined || suffix < headAt)) {
|
|
947
|
-
head = first;
|
|
948
|
-
headAt = suffix;
|
|
949
|
-
}
|
|
950
|
-
}
|
|
821
|
+
Limit: 1,
|
|
822
|
+
});
|
|
823
|
+
const head = page.Items?.[0];
|
|
951
824
|
if (head === undefined)
|
|
952
825
|
return { delivered, undelivered: Option.none() };
|
|
953
826
|
const raw = fromAttributeMap(head);
|
|
@@ -1006,33 +879,9 @@ export const makeEngine = (config) => {
|
|
|
1006
879
|
delivered++;
|
|
1007
880
|
}
|
|
1008
881
|
});
|
|
1009
|
-
/**
|
|
1010
|
-
* Drain the row at `key`: under its current key, and — while the fallback is
|
|
1011
|
-
* on (#171) — its 1.36 key, where 1.36 left the items it wrote. A key that
|
|
1012
|
-
* can also hold another value's items is read for the row's own: its
|
|
1013
|
-
* current key when it reads back as another value's 1.36 key (`foo bar`'s
|
|
1014
|
-
* is `foo%20bar`'s) for the marked ones, its 1.36 key when that can be
|
|
1015
|
-
* another value's current key (`_spells136`) for the unmarked ones.
|
|
1016
|
-
*/
|
|
1017
882
|
const drain = (key, deliver) => {
|
|
1018
|
-
const
|
|
1019
|
-
|
|
1020
|
-
const rows = [
|
|
1021
|
-
{
|
|
1022
|
-
pk: String(rowKey[primary.pk.field]),
|
|
1023
|
-
sk: String(rowKey[primary.sk.field]),
|
|
1024
|
-
only: typeof readModel._currentKeyOf136(rowKey) === "object" ? "marked" : undefined,
|
|
1025
|
-
},
|
|
1026
|
-
];
|
|
1027
|
-
const old = readModel._primaryKey136(record);
|
|
1028
|
-
if (old !== undefined) {
|
|
1029
|
-
rows.unshift({
|
|
1030
|
-
pk: old[primary.pk.field],
|
|
1031
|
-
sk: old[primary.sk.field],
|
|
1032
|
-
only: readModel._spells136(record) ? "unmarked" : undefined,
|
|
1033
|
-
});
|
|
1034
|
-
}
|
|
1035
|
-
return drainRaw(rows, deliver);
|
|
883
|
+
const rowKey = composePrimaryKey(readModel, key);
|
|
884
|
+
return drainRaw(String(rowKey[primary.pk.field]), String(rowKey[primary.sk.field]), deliver);
|
|
1036
885
|
};
|
|
1037
886
|
/** Every row with pending effects, through the outbox's sparse index, drained. */
|
|
1038
887
|
const drainPending = (deliver) => Effect.gen(function* () {
|
|
@@ -1046,7 +895,6 @@ export const makeEngine = (config) => {
|
|
|
1046
895
|
}
|
|
1047
896
|
const client = yield* Capacity.client;
|
|
1048
897
|
const TableName = yield* outboxTable;
|
|
1049
|
-
/** The row keys items name, and whether marked and unmarked items name each. */
|
|
1050
898
|
const rows = new Map();
|
|
1051
899
|
let start;
|
|
1052
900
|
do {
|
|
@@ -1062,47 +910,14 @@ export const makeEngine = (config) => {
|
|
|
1062
910
|
const raw = fromAttributeMap(item);
|
|
1063
911
|
const pk = String(raw[ROW_PK]);
|
|
1064
912
|
const sk = String(raw[ROW_SK]);
|
|
1065
|
-
|
|
1066
|
-
const named = rows.get(id) ?? { pk, sk, marked: false, unmarked: false };
|
|
1067
|
-
if (raw[KEY_TEXT] === undefined)
|
|
1068
|
-
named.unmarked = true;
|
|
1069
|
-
else
|
|
1070
|
-
named.marked = true;
|
|
1071
|
-
rows.set(id, named);
|
|
913
|
+
rows.set(`${pk}\u0000${sk}`, [pk, sk]);
|
|
1072
914
|
}
|
|
1073
915
|
start = page.LastEvaluatedKey;
|
|
1074
916
|
} while (start !== undefined);
|
|
1075
|
-
// A row's items under its 1.36 key (#171) are drained with those under
|
|
1076
|
-
// its current key, in one order: the key an item 1.36 wrote names is
|
|
1077
|
-
// read back as 1.36 text (`_currentKeyOf136`) to find where the row is
|
|
1078
|
-
// now. When that is another row (`foo%20bar`'s 1.36 key is `foo bar`'s
|
|
1079
|
-
// current key), the key's unmarked items are that row's, and its
|
|
1080
|
-
// marked ones the row of the key.
|
|
1081
|
-
const byRow = new Map();
|
|
1082
|
-
const add = (rowPk, rowSk, at) => {
|
|
1083
|
-
const id = `${rowPk}\u0000${rowSk}`;
|
|
1084
|
-
byRow.set(id, [...(byRow.get(id) ?? []), at]);
|
|
1085
|
-
};
|
|
1086
|
-
for (const { pk, sk, marked, unmarked } of rows.values()) {
|
|
1087
|
-
const placed = readModel._currentKeyOf136({
|
|
1088
|
-
[primary.pk.field]: pk,
|
|
1089
|
-
[primary.sk.field]: sk,
|
|
1090
|
-
});
|
|
1091
|
-
if (typeof placed !== "object") {
|
|
1092
|
-
add(pk, sk, { pk, sk });
|
|
1093
|
-
continue;
|
|
1094
|
-
}
|
|
1095
|
-
if (unmarked) {
|
|
1096
|
-
const current = placed.current;
|
|
1097
|
-
add(current[primary.pk.field], current[primary.sk.field], { pk, sk, only: "unmarked" });
|
|
1098
|
-
}
|
|
1099
|
-
if (marked)
|
|
1100
|
-
add(pk, sk, { pk, sk, only: "marked" });
|
|
1101
|
-
}
|
|
1102
917
|
let delivered = 0;
|
|
1103
918
|
const undelivered = [];
|
|
1104
|
-
for (const
|
|
1105
|
-
const result = yield* drainRaw(
|
|
919
|
+
for (const [pk, sk] of rows.values()) {
|
|
920
|
+
const result = yield* drainRaw(pk, sk, deliver);
|
|
1106
921
|
delivered += result.delivered;
|
|
1107
922
|
if (Option.isSome(result.undelivered))
|
|
1108
923
|
undelivered.push(result.undelivered.value);
|