@elaraai/e3-types 1.0.105 → 1.0.107
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/dist/src/dataset-blob.d.ts +21 -16
- package/dist/src/dataset-blob.d.ts.map +1 -1
- package/dist/src/dataset-blob.js +56 -29
- package/dist/src/dataset-blob.js.map +1 -1
- package/dist/src/dataset-blob.spec.js +76 -60
- package/dist/src/dataset-blob.spec.js.map +1 -1
- package/dist/src/dataset.d.ts.map +1 -1
- package/dist/src/dataset.js +3 -5
- package/dist/src/dataset.js.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/release.d.ts +1 -1
- package/dist/src/release.js +1 -1
- package/package.json +2 -2
- package/src/dataset-blob.spec.ts +84 -68
- package/src/dataset-blob.ts +60 -33
- package/src/dataset.ts +3 -5
- package/src/index.ts +1 -1
- package/src/release.ts +1 -1
|
@@ -29,20 +29,23 @@
|
|
|
29
29
|
import { type Beast2RecutPiece, type Beast2SegmentRef, type EastType, type EastTypeValue } from '@elaraai/east';
|
|
30
30
|
import { type CollectionManifestEntry } from './collection-manifest.js';
|
|
31
31
|
/**
|
|
32
|
-
* Writes one
|
|
32
|
+
* Writes a batch of objects, no one of which names another, and answers their
|
|
33
|
+
* content hashes in the order given.
|
|
33
34
|
*
|
|
34
35
|
* @remarks
|
|
35
36
|
* The whole of the object store this module needs. Content-addressed, so
|
|
36
37
|
* writing bytes already stored is a no-op that returns the same hash — which is
|
|
37
|
-
* exactly how a new state shares its unchanged segments with the old one.
|
|
38
|
+
* exactly how a new state shares its unchanged segments with the old one. A
|
|
39
|
+
* store whose writes are requests sends a batch as a few (e3-core's
|
|
40
|
+
* `ObjectStore.writeMany`).
|
|
38
41
|
*/
|
|
39
|
-
export type SegmentSink = (
|
|
42
|
+
export type SegmentSink = (objects: readonly Uint8Array[]) => Promise<string[]>;
|
|
40
43
|
/**
|
|
41
|
-
*
|
|
44
|
+
* The most objects {@link writeCollectionManifest} hands its sink in one batch,
|
|
42
45
|
* unless its caller says otherwise: a store whose writes are round trips is
|
|
43
46
|
* waited on once for this many segments, rather than once for each.
|
|
44
47
|
*/
|
|
45
|
-
export declare const
|
|
48
|
+
export declare const SEGMENT_WRITE_BATCH = 16;
|
|
46
49
|
/**
|
|
47
50
|
* Whether a dataset root type is a collection — the kinds stored segmented +
|
|
48
51
|
* indexed so the paged read API can seek.
|
|
@@ -80,26 +83,28 @@ export type CollectionPiece = Beast2RecutPiece<EastType, CollectionSegmentRef>;
|
|
|
80
83
|
* Writer's own: a piece's segments are carried over only when that is the
|
|
81
84
|
* header they are under, which is the caller's to establish.
|
|
82
85
|
*
|
|
83
|
-
* The objects
|
|
84
|
-
* order, then the header —
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
86
|
+
* The objects go to the sink in batches of up to `batch` — the segments in
|
|
87
|
+
* order, then the header — one batch in flight while the next is gathered, so
|
|
88
|
+
* a collection of a few segments is one batch however its pieces arrive, and
|
|
89
|
+
* a large one keeps a batch in flight as it is cut. A batch is sent once it is
|
|
90
|
+
* full, or once the header is cut, and the manifest is returned once every
|
|
91
|
+
* object is stored, so the caller stores the manifest after the objects it
|
|
92
|
+
* names. Each segment's blob is held until its batch is stored.
|
|
88
93
|
*
|
|
89
94
|
* @param type - The collection type (Array / Set / Dict)
|
|
90
95
|
* @param pieces - The collection's pieces, in order
|
|
91
|
-
* @param sink - Writes
|
|
92
|
-
* @param options - `
|
|
93
|
-
* (default {@link
|
|
96
|
+
* @param sink - Writes a batch of objects and returns their hashes
|
|
97
|
+
* @param options - `batch`, the most objects the sink is handed at once
|
|
98
|
+
* (default {@link SEGMENT_WRITE_BATCH})
|
|
94
99
|
* @returns The manifest's bytes — the caller stores them, and its hash is the
|
|
95
100
|
* dataset's content address
|
|
96
101
|
* @throws {Error} When a piece's elements do not ascend (Set / Dict), a
|
|
97
102
|
* segment's blob is not the one segment its reference describes, or the sink
|
|
98
|
-
* rejects: once the
|
|
103
|
+
* rejects: once the batch in flight has ended, so none runs on after the
|
|
99
104
|
* writer returns.
|
|
100
105
|
*/
|
|
101
106
|
export declare function writeCollectionManifest(type: EastType | EastTypeValue, pieces: Iterable<CollectionPiece> | AsyncIterable<CollectionPiece>, sink: SegmentSink, options?: {
|
|
102
|
-
|
|
107
|
+
batch?: number;
|
|
103
108
|
}): Promise<Uint8Array>;
|
|
104
109
|
/**
|
|
105
110
|
* Encode a dataset value for the object store.
|
|
@@ -117,7 +122,7 @@ export declare function writeCollectionManifest(type: EastType | EastTypeValue,
|
|
|
117
122
|
*
|
|
118
123
|
* @param type - The dataset's declared type (an `EastType` or its homoiconic value)
|
|
119
124
|
* @param value - The value to encode
|
|
120
|
-
* @param sink - Writes
|
|
125
|
+
* @param sink - Writes a batch of objects and returns their hashes
|
|
121
126
|
* @returns The beast2 bytes to store — the manifest, for a collection written
|
|
122
127
|
* through a sink; otherwise the value's own blob
|
|
123
128
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataset-blob.d.ts","sourceRoot":"","sources":["../../src/dataset-blob.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAUL,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACb,KAAK,aAAa,EACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EAGL,KAAK,uBAAuB,EAC7B,MAAM,0BAA0B,CAAC;AAElC
|
|
1
|
+
{"version":3,"file":"dataset-blob.d.ts","sourceRoot":"","sources":["../../src/dataset-blob.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAUL,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACb,KAAK,aAAa,EACnB,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{ SortedMap, SortedSet, compareFor, encodeBeast2For, encodeBeast2PagedFor, isVariant, recutBeast2For, segmentRuleFor, toEastTypeValue, } from '@elaraai/east';
|
|
30
30
|
import { COLLECTION_MANIFEST_KIND, encodeCollectionManifest, } from './collection-manifest.js';
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* The most objects {@link writeCollectionManifest} hands its sink in one batch,
|
|
33
33
|
* unless its caller says otherwise: a store whose writes are round trips is
|
|
34
34
|
* waited on once for this many segments, rather than once for each.
|
|
35
35
|
*/
|
|
36
|
-
export const
|
|
36
|
+
export const SEGMENT_WRITE_BATCH = 16;
|
|
37
37
|
/**
|
|
38
|
-
* The writes of one manifest's objects: each
|
|
39
|
-
* handed over,
|
|
40
|
-
*
|
|
38
|
+
* The writes of one manifest's objects, in batches: each object gathered in
|
|
39
|
+
* the order it is handed over, a batch sent once it holds `width` objects or
|
|
40
|
+
* the last object is handed over, one batch in flight while the next is
|
|
41
|
+
* gathered, and none left running once the manifest's writer returns.
|
|
41
42
|
*
|
|
42
43
|
* @internal
|
|
43
44
|
*/
|
|
44
45
|
class SinkWrites {
|
|
45
46
|
sink;
|
|
46
47
|
width;
|
|
47
|
-
|
|
48
|
+
/** The objects gathered for the next batch, each with what it is told. */
|
|
49
|
+
gathered = [];
|
|
50
|
+
/** The batch in flight, which settles without throwing. */
|
|
51
|
+
inFlight;
|
|
48
52
|
failure;
|
|
49
53
|
constructor(sink, width) {
|
|
50
54
|
this.sink = sink;
|
|
51
55
|
this.width = width;
|
|
52
56
|
}
|
|
53
57
|
/**
|
|
54
|
-
*
|
|
58
|
+
* Gathers `bytes` for the next batch, and sends the batch once it holds
|
|
59
|
+
* `width` objects and the batch before it is stored.
|
|
55
60
|
*
|
|
56
61
|
* @param bytes - The object
|
|
57
62
|
* @param named - Told the object's hash once it is stored
|
|
58
|
-
* @throws The
|
|
59
|
-
*
|
|
63
|
+
* @throws The failed batch's error, once one has failed: nothing more is
|
|
64
|
+
* sent after it.
|
|
60
65
|
*/
|
|
61
66
|
async start(bytes, named) {
|
|
62
|
-
while (this.failure === undefined && this.inFlight.size >= this.width)
|
|
63
|
-
await Promise.race(this.inFlight);
|
|
64
67
|
if (this.failure !== undefined)
|
|
65
68
|
throw this.failure.error;
|
|
66
|
-
|
|
67
|
-
|
|
69
|
+
this.gathered.push({ bytes, named });
|
|
70
|
+
if (this.gathered.length >= this.width)
|
|
71
|
+
await this.send();
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Sends the objects gathered, once the batch in flight is stored.
|
|
75
|
+
*
|
|
76
|
+
* @throws The failed batch's error, once one has failed.
|
|
77
|
+
*/
|
|
78
|
+
async send() {
|
|
79
|
+
await this.settled();
|
|
80
|
+
if (this.failure !== undefined)
|
|
81
|
+
throw this.failure.error;
|
|
82
|
+
const batch = this.gathered;
|
|
83
|
+
if (batch.length === 0)
|
|
84
|
+
return;
|
|
85
|
+
this.gathered = [];
|
|
86
|
+
const sent = this.sink(batch.map(({ bytes }) => bytes))
|
|
87
|
+
.then((hashes) => {
|
|
88
|
+
batch.forEach(({ named }, i) => named(hashes[i]));
|
|
89
|
+
}, (error) => {
|
|
68
90
|
this.failure ??= { error };
|
|
69
91
|
})
|
|
70
92
|
.finally(() => {
|
|
71
|
-
this.inFlight
|
|
93
|
+
if (this.inFlight === sent)
|
|
94
|
+
this.inFlight = undefined;
|
|
72
95
|
});
|
|
73
|
-
this.inFlight
|
|
96
|
+
this.inFlight = sent;
|
|
74
97
|
}
|
|
75
|
-
/** Waits for
|
|
98
|
+
/** Waits for the batch in flight, whatever its outcome. */
|
|
76
99
|
async settled() {
|
|
77
|
-
|
|
100
|
+
while (this.inFlight !== undefined)
|
|
101
|
+
await this.inFlight;
|
|
78
102
|
}
|
|
79
103
|
/**
|
|
80
|
-
*
|
|
104
|
+
* Sends what is gathered, and waits for every batch.
|
|
81
105
|
*
|
|
82
|
-
* @throws The
|
|
106
|
+
* @throws The failed batch's error.
|
|
83
107
|
*/
|
|
84
108
|
async stored() {
|
|
109
|
+
await this.send();
|
|
85
110
|
await this.settled();
|
|
86
111
|
if (this.failure !== undefined)
|
|
87
112
|
throw this.failure.error;
|
|
@@ -115,28 +140,30 @@ function asTypeValue(type) {
|
|
|
115
140
|
* Writer's own: a piece's segments are carried over only when that is the
|
|
116
141
|
* header they are under, which is the caller's to establish.
|
|
117
142
|
*
|
|
118
|
-
* The objects
|
|
119
|
-
* order, then the header —
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
143
|
+
* The objects go to the sink in batches of up to `batch` — the segments in
|
|
144
|
+
* order, then the header — one batch in flight while the next is gathered, so
|
|
145
|
+
* a collection of a few segments is one batch however its pieces arrive, and
|
|
146
|
+
* a large one keeps a batch in flight as it is cut. A batch is sent once it is
|
|
147
|
+
* full, or once the header is cut, and the manifest is returned once every
|
|
148
|
+
* object is stored, so the caller stores the manifest after the objects it
|
|
149
|
+
* names. Each segment's blob is held until its batch is stored.
|
|
123
150
|
*
|
|
124
151
|
* @param type - The collection type (Array / Set / Dict)
|
|
125
152
|
* @param pieces - The collection's pieces, in order
|
|
126
|
-
* @param sink - Writes
|
|
127
|
-
* @param options - `
|
|
128
|
-
* (default {@link
|
|
153
|
+
* @param sink - Writes a batch of objects and returns their hashes
|
|
154
|
+
* @param options - `batch`, the most objects the sink is handed at once
|
|
155
|
+
* (default {@link SEGMENT_WRITE_BATCH})
|
|
129
156
|
* @returns The manifest's bytes — the caller stores them, and its hash is the
|
|
130
157
|
* dataset's content address
|
|
131
158
|
* @throws {Error} When a piece's elements do not ascend (Set / Dict), a
|
|
132
159
|
* segment's blob is not the one segment its reference describes, or the sink
|
|
133
|
-
* rejects: once the
|
|
160
|
+
* rejects: once the batch in flight has ended, so none runs on after the
|
|
134
161
|
* writer returns.
|
|
135
162
|
*/
|
|
136
163
|
export async function writeCollectionManifest(type, pieces, sink, options = {}) {
|
|
137
164
|
const typeValue = asTypeValue(type);
|
|
138
165
|
const entries = [];
|
|
139
|
-
const writes = new SinkWrites(sink, options.
|
|
166
|
+
const writes = new SinkWrites(sink, options.batch ?? SEGMENT_WRITE_BATCH);
|
|
140
167
|
/** Writes a segment the manifest names at the place it takes now. */
|
|
141
168
|
const write = (blob, fence, count) => {
|
|
142
169
|
const at = entries.push({ hash: '', fence, count: BigInt(count), bytes: BigInt(blob.byteLength) }) - 1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataset-blob.js","sourceRoot":"","sources":["../../src/dataset-blob.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EACL,SAAS,EACT,SAAS,EACT,UAAU,EACV,eAAe,EACf,oBAAoB,EACpB,SAAS,EACT,cAAc,EACd,cAAc,EACd,eAAe,GAKhB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,wBAAwB,EACxB,wBAAwB,GAEzB,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"dataset-blob.js","sourceRoot":"","sources":["../../src/dataset-blob.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EACL,SAAS,EACT,SAAS,EACT,UAAU,EACV,eAAe,EACf,oBAAoB,EACpB,SAAS,EACT,cAAc,EACd,cAAc,EACd,eAAe,GAKhB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,wBAAwB,EACxB,wBAAwB,GAEzB,MAAM,0BAA0B,CAAC;AAelC;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAEtC;;;;;;;GAOG;AACH,MAAM,UAAU;IAOe,IAAI;IAAgC,KAAK;IANtE,0EAA0E;IAClE,QAAQ,GAAgE,EAAE,CAAC;IACnF,2DAA2D;IACnD,QAAQ,CAA4B;IACpC,OAAO,CAAiC;IAEhD,YAA6B,IAAiB,EAAmB,KAAa;oBAAjD,IAAI;qBAAgC,KAAK;IAAW,CA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CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAI,KAAsB,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,KAAsB,CAAC,CAAC,CAAC;IAC9H,CAAC;IACD,MAAM,GAAG,GAAG,UAAU,CAAE,SAAS,CAAC,KAAgC,CAAC,GAAG,CAAC,CAAC;IACxE,OAAO,KAAK,YAAY,SAAS;QAC/B,CAAC,CAAE,KAAqC,CAAC,OAAO,EAAE;QAClD,CAAC,CAAC,CAAC,GAAI,KAA+B,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACtF,CAAC"}
|
|
@@ -16,25 +16,27 @@ const TableType = DictType(StringType, IntegerType);
|
|
|
16
16
|
function rowsOf(n) {
|
|
17
17
|
return new SortedMap(Array.from({ length: n }, (_, i) => [`k${String(i).padStart(6, '0')}`, BigInt(i)]), compareFor(StringType));
|
|
18
18
|
}
|
|
19
|
-
/** A sink
|
|
20
|
-
|
|
19
|
+
/** A sink that stores nothing, and answers each object's hash. */
|
|
20
|
+
const hashing = (batch) => Promise.resolve(batch.map((bytes) => sha256Hex(bytes)));
|
|
21
|
+
/** A sink whose batches are held until the test ends each one: the batches in
|
|
22
|
+
* flight, and the hashes of every batch it was handed, in order. */
|
|
21
23
|
function heldSink() {
|
|
22
24
|
const open = [];
|
|
23
25
|
const calls = [];
|
|
24
|
-
const sink = (
|
|
25
|
-
const
|
|
26
|
-
calls.push(
|
|
27
|
-
const
|
|
28
|
-
|
|
26
|
+
const sink = (batch) => new Promise((resolve, reject) => {
|
|
27
|
+
const hashes = batch.map((bytes) => sha256Hex(bytes));
|
|
28
|
+
calls.push(hashes);
|
|
29
|
+
const held = {
|
|
30
|
+
hashes,
|
|
29
31
|
end: (failure) => {
|
|
30
|
-
open.splice(open.indexOf(
|
|
32
|
+
open.splice(open.indexOf(held), 1);
|
|
31
33
|
if (failure === undefined)
|
|
32
|
-
resolve(
|
|
34
|
+
resolve(hashes);
|
|
33
35
|
else
|
|
34
36
|
reject(failure);
|
|
35
37
|
},
|
|
36
38
|
};
|
|
37
|
-
open.push(
|
|
39
|
+
open.push(held);
|
|
38
40
|
});
|
|
39
41
|
return { sink, open, calls };
|
|
40
42
|
}
|
|
@@ -56,11 +58,11 @@ describe('writeCollectionManifest', () => {
|
|
|
56
58
|
it("writes the manifest writer's manifest for the value, byte for byte", async () => {
|
|
57
59
|
const value = new SortedMap(Array.from({ length: 20_000 }, (_, i) => [`k${String(i).padStart(6, '0')}`, BigInt(i)]), compareFor(StringType));
|
|
58
60
|
const objects = new Map();
|
|
59
|
-
const manifest = await writeCollectionManifest(TableType, [{ elements: value.entries() }], async (bytes) => {
|
|
61
|
+
const manifest = await writeCollectionManifest(TableType, [{ elements: value.entries() }], async (batch) => batch.map((bytes) => {
|
|
60
62
|
const hash = sha256Hex(bytes);
|
|
61
63
|
objects.set(hash, bytes);
|
|
62
64
|
return hash;
|
|
63
|
-
});
|
|
65
|
+
}));
|
|
64
66
|
const expectedObjects = new Map();
|
|
65
67
|
let expected;
|
|
66
68
|
const writer = new Beast2ManifestWriter(TableType, {
|
|
@@ -77,11 +79,11 @@ describe('writeCollectionManifest', () => {
|
|
|
77
79
|
it('names the segments a piece carries with their entries again, neither reading nor writing them', async () => {
|
|
78
80
|
const value = new SortedMap(Array.from({ length: 20_000 }, (_, i) => [`k${String(i).padStart(6, '0')}`, BigInt(i)]), compareFor(StringType));
|
|
79
81
|
const objects = new Map();
|
|
80
|
-
const sink = async (bytes) => {
|
|
82
|
+
const sink = async (batch) => batch.map((bytes) => {
|
|
81
83
|
const hash = sha256Hex(bytes);
|
|
82
84
|
objects.set(hash, bytes);
|
|
83
85
|
return hash;
|
|
84
|
-
};
|
|
86
|
+
});
|
|
85
87
|
const whole = await writeCollectionManifest(TableType, [{ elements: value.entries() }], sink);
|
|
86
88
|
const entries = decodeCollectionManifest(whole).entries;
|
|
87
89
|
const half = entries.length >> 1;
|
|
@@ -102,42 +104,54 @@ describe('writeCollectionManifest', () => {
|
|
|
102
104
|
const again = await writeCollectionManifest(TableType, [
|
|
103
105
|
{ segments: carried },
|
|
104
106
|
{ elements: value.entries(decodeBeast2FenceFor(StringType)(entries[half].fence)) },
|
|
105
|
-
], async (
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
], async (batch) => {
|
|
108
|
+
const hashes = await sink(batch);
|
|
109
|
+
for (const hash of hashes)
|
|
110
|
+
written.add(hash);
|
|
111
|
+
return hashes;
|
|
109
112
|
});
|
|
110
113
|
assert.deepEqual(again, whole, 'the same manifest');
|
|
111
114
|
assert.deepEqual(reads, [], 'the seam is decided by the fence that followed');
|
|
112
115
|
for (const entry of entries.slice(0, half))
|
|
113
116
|
assert.ok(!written.has(entry.hash), `segment ${entry.hash.slice(0, 8)} is carried`);
|
|
114
117
|
});
|
|
115
|
-
it('
|
|
118
|
+
it('hands the sink the objects in order, in full batches, one in flight while the next is gathered, and returns once every one is stored', async () => {
|
|
116
119
|
const value = rowsOf(20_000);
|
|
117
|
-
const expected = await writeCollectionManifest(TableType, [{ elements: value.entries() }],
|
|
118
|
-
const entries = decodeCollectionManifest(expected)
|
|
119
|
-
const objects = entries.length + 1;
|
|
120
|
+
const expected = await writeCollectionManifest(TableType, [{ elements: value.entries() }], hashing);
|
|
121
|
+
const { entries, header } = decodeCollectionManifest(expected);
|
|
120
122
|
const { sink, open, calls } = heldSink();
|
|
121
123
|
let manifest;
|
|
122
|
-
const writing = writeCollectionManifest(TableType, [{ elements: value.entries() }], sink, {
|
|
124
|
+
const writing = writeCollectionManifest(TableType, [{ elements: value.entries() }], sink, { batch: 3 })
|
|
123
125
|
.then((bytes) => {
|
|
124
126
|
manifest = bytes;
|
|
125
127
|
});
|
|
126
|
-
// Each
|
|
127
|
-
//
|
|
128
|
-
// has as many in flight as it may: three, or the objects left.
|
|
128
|
+
// Each batch is stored only when the test ends it. Between ends, one batch
|
|
129
|
+
// is in flight, and the writer sends the next only once it is stored.
|
|
129
130
|
while (manifest === undefined) {
|
|
130
|
-
|
|
131
|
-
await until(() => manifest !== undefined || open.length === inFlight(), 'as many writes in flight as may be');
|
|
131
|
+
await until(() => manifest !== undefined || open.length > 0, 'a batch in flight');
|
|
132
132
|
await turns(20);
|
|
133
133
|
if (manifest !== undefined)
|
|
134
134
|
break;
|
|
135
|
-
assert.equal(open.length,
|
|
136
|
-
open.
|
|
135
|
+
assert.equal(open.length, 1, `${open.length} batches in flight, of ${calls.length} sent`);
|
|
136
|
+
open[0].end();
|
|
137
137
|
}
|
|
138
138
|
await writing;
|
|
139
|
-
assert.deepEqual(manifest, expected, 'the manifest a write
|
|
140
|
-
assert.deepEqual(calls, [...entries.map((entry) => entry.hash),
|
|
139
|
+
assert.deepEqual(manifest, expected, 'the manifest a write of each object writes, each entry in its place');
|
|
140
|
+
assert.deepEqual(calls.flat(), [...entries.map((entry) => entry.hash), header], 'the segments, in order, and then the header');
|
|
141
|
+
assert.ok(calls.slice(0, -1).every((batch) => batch.length === 3), 'every batch but the last is full');
|
|
142
|
+
assert.ok(calls.at(-1).length <= 3, 'and the last holds what is left');
|
|
143
|
+
});
|
|
144
|
+
it('hands a collection of a few segments to the sink in one batch', async () => {
|
|
145
|
+
const value = rowsOf(4_000);
|
|
146
|
+
const { entries, header } = decodeCollectionManifest(await writeCollectionManifest(TableType, [{ elements: value.entries() }], hashing));
|
|
147
|
+
assert.ok(entries.length > 1, 'the value spans segments');
|
|
148
|
+
const calls = [];
|
|
149
|
+
await writeCollectionManifest(TableType, [{ elements: value.entries() }], async (batch) => {
|
|
150
|
+
const hashes = await hashing(batch);
|
|
151
|
+
calls.push(hashes);
|
|
152
|
+
return hashes;
|
|
153
|
+
});
|
|
154
|
+
assert.deepEqual(calls, [[...entries.map((entry) => entry.hash), header]]);
|
|
141
155
|
});
|
|
142
156
|
/** A writer's failure, once it has failed: read through a function, which
|
|
143
157
|
* no assertion narrows. */
|
|
@@ -150,55 +164,57 @@ describe('writeCollectionManifest', () => {
|
|
|
150
164
|
});
|
|
151
165
|
return () => settled;
|
|
152
166
|
}
|
|
153
|
-
it('
|
|
167
|
+
it('sends no batch after one fails, and throws its failure', async () => {
|
|
154
168
|
const { sink, open, calls } = heldSink();
|
|
155
|
-
const writing = writeCollectionManifest(TableType, [{ elements: rowsOf(20_000).entries() }], sink, {
|
|
169
|
+
const writing = writeCollectionManifest(TableType, [{ elements: rowsOf(20_000).entries() }], sink, { batch: 3 });
|
|
156
170
|
const settled = failureOf(writing);
|
|
157
|
-
await until(() => open.length ===
|
|
158
|
-
|
|
159
|
-
open[1].end(failure);
|
|
171
|
+
await until(() => open.length === 1, 'a batch in flight');
|
|
172
|
+
// The next batch gathered, waiting for this one
|
|
160
173
|
await turns(20);
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
await writing.catch(() => { });
|
|
174
|
+
const failure = new Error('the store is gone');
|
|
175
|
+
open[0].end(failure);
|
|
176
|
+
await until(() => settled() !== undefined, "the writer's end");
|
|
177
|
+
assert.equal(calls.length, 1, 'nothing is sent after a batch fails');
|
|
166
178
|
assert.equal(settled()?.failure, failure);
|
|
167
179
|
});
|
|
168
|
-
it(
|
|
180
|
+
it("throws a failure of the last batch, the header's", async () => {
|
|
169
181
|
const value = rowsOf(20_000);
|
|
170
|
-
const { header } = decodeCollectionManifest(await writeCollectionManifest(TableType, [{ elements: value.entries() }],
|
|
182
|
+
const { header } = decodeCollectionManifest(await writeCollectionManifest(TableType, [{ elements: value.entries() }], hashing));
|
|
171
183
|
const { sink, open } = heldSink();
|
|
172
|
-
const writing = writeCollectionManifest(TableType, [{ elements: value.entries() }], sink, {
|
|
184
|
+
const writing = writeCollectionManifest(TableType, [{ elements: value.entries() }], sink, { batch: 3 });
|
|
173
185
|
const settled = failureOf(writing);
|
|
174
|
-
// Every
|
|
186
|
+
// Every batch is stored but the one holding the header, the last sent.
|
|
175
187
|
const failure = new Error('the store is gone');
|
|
176
188
|
for (;;) {
|
|
177
|
-
await until(() => settled() !== undefined || open.length > 0, 'a
|
|
189
|
+
await until(() => settled() !== undefined || open.length > 0, 'a batch in flight, or the writer\'s end');
|
|
178
190
|
if (settled() !== undefined)
|
|
179
191
|
break;
|
|
180
|
-
const
|
|
181
|
-
|
|
192
|
+
const batch = open[0];
|
|
193
|
+
batch.end(batch.hashes.includes(header) ? failure : undefined);
|
|
182
194
|
}
|
|
183
195
|
assert.equal(settled()?.failure, failure);
|
|
184
196
|
});
|
|
185
|
-
it('throws a piece\'s failure once the
|
|
186
|
-
|
|
187
|
-
//
|
|
197
|
+
it('throws a piece\'s failure once the batch in flight has ended', async () => {
|
|
198
|
+
// A batch larger than half the segments the rows before the one out of
|
|
199
|
+
// order are cut into, and no larger than they: one batch is sent, and the
|
|
200
|
+
// next is never full, so the row out of order is read with a batch in flight.
|
|
201
|
+
const segments = decodeCollectionManifest(await writeCollectionManifest(TableType, [{ elements: rowsOf(20_000).entries() }], hashing))
|
|
202
|
+
.entries.length;
|
|
203
|
+
const { sink, open, calls } = heldSink();
|
|
188
204
|
let disordered = false;
|
|
189
205
|
function* rows() {
|
|
190
206
|
yield* rowsOf(20_000).entries();
|
|
191
207
|
disordered = true;
|
|
192
208
|
yield ['a', 0n];
|
|
193
209
|
}
|
|
194
|
-
const writing = writeCollectionManifest(TableType, [{ elements: rows() }], sink, {
|
|
210
|
+
const writing = writeCollectionManifest(TableType, [{ elements: rows() }], sink, { batch: (segments >> 1) + 1 });
|
|
195
211
|
const settled = failureOf(writing);
|
|
196
212
|
await until(() => disordered, 'the row out of order');
|
|
197
213
|
await turns(20);
|
|
198
|
-
assert.
|
|
199
|
-
assert.equal(
|
|
200
|
-
for
|
|
201
|
-
|
|
214
|
+
assert.equal(calls.length, 1, 'one batch is sent');
|
|
215
|
+
assert.equal(open.length, 1, 'and in flight');
|
|
216
|
+
assert.equal(settled(), undefined, 'the writer waits for the batch in flight');
|
|
217
|
+
open[0].end();
|
|
202
218
|
await writing.catch(() => { });
|
|
203
219
|
const failure = settled()?.failure;
|
|
204
220
|
assert.ok(failure instanceof Error, 'the piece\'s failure');
|
|
@@ -214,9 +230,9 @@ describe('encodeDatasetBlob', () => {
|
|
|
214
230
|
const whole = encodeBeast2For(RowType)(row);
|
|
215
231
|
assert.deepEqual(encodeDatasetBlob(RowType, row), whole);
|
|
216
232
|
const sunk = [];
|
|
217
|
-
assert.deepEqual(await encodeDatasetBlob(RowType, row, async (
|
|
218
|
-
sunk.push(
|
|
219
|
-
return
|
|
233
|
+
assert.deepEqual(await encodeDatasetBlob(RowType, row, async (batch) => {
|
|
234
|
+
sunk.push(...batch);
|
|
235
|
+
return hashing(batch);
|
|
220
236
|
}), whole, 'a sink changes nothing for a value that is not a collection');
|
|
221
237
|
assert.deepEqual(sunk, []);
|
|
222
238
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataset-blob.spec.js","sourceRoot":"","sources":["../../src/dataset-blob.spec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EACL,oBAAoB,EACpB,QAAQ,EACR,WAAW,EACX,SAAS,EACT,UAAU,EACV,UAAU,EACV,UAAU,EACV,oBAAoB,EACpB,wBAAwB,EACxB,eAAe,EACf,oBAAoB,EACpB,SAAS,GACV,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAA6B,MAAM,mBAAmB,CAAC;AAE1G,MAAM,SAAS,GAAG,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;AAEpD,kEAAkE;AAClE,SAAS,MAAM,CAAC,CAAS;IACvB,OAAO,IAAI,SAAS,CAClB,K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-
{"version":3,"file":"dataset.d.ts","sourceRoot":"","sources":["../../src/dataset.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAW,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9G;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,WAAW;IACtB,mDAAmD;;IAEnD,oDAAoD;;IAEpD,8CAA8C;;IAE9C,wCAAwC;;EAExC,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC;AAE7C,MAAM,MAAM,OAAO,GAAG,WAAW,CAAC,OAAO,WAAW,CAAC,CAAC;AAEtD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,aAAa,EAAE,OAAqC,CAAC;AAElE;;;;GAIG;AACH,eAAO,MAAM,OAAO,EAAE,OAA+B,CAAC;AAEtD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,QAAQ,IACzC,CAAC,SAAS,UAAU,CAAC,MAAM,MAAM,CAAC,GAAG,UAAU,CAAC;KAAG,CAAC,IAAI,MAAM,MAAM,GAAG,WAAW;CAAE,CAAC,GACrF,KAAK,CAAC;AAER;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,QAAQ,EAAE,IAAI,EAAE,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"dataset.d.ts","sourceRoot":"","sources":["../../src/dataset.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAW,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9G;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,WAAW;IACtB,mDAAmD;;IAEnD,oDAAoD;;IAEpD,8CAA8C;;IAE9C,wCAAwC;;EAExC,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC;AAE7C,MAAM,MAAM,OAAO,GAAG,WAAW,CAAC,OAAO,WAAW,CAAC,CAAC;AAEtD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,aAAa,EAAE,OAAqC,CAAC;AAElE;;;;GAIG;AACH,eAAO,MAAM,OAAO,EAAE,OAA+B,CAAC;AAEtD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,QAAQ,IACzC,CAAC,SAAS,UAAU,CAAC,MAAM,MAAM,CAAC,GAAG,UAAU,CAAC;KAAG,CAAC,IAAI,MAAM,MAAM,GAAG,WAAW;CAAE,CAAC,GACrF,KAAK,CAAC;AAER;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,QAAQ,EAAE,IAAI,EAAE,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAQzE"}
|
package/dist/src/dataset.js
CHANGED
|
@@ -83,11 +83,9 @@ export const nullRef = variant('null', null);
|
|
|
83
83
|
*/
|
|
84
84
|
export function DataTreeType(type) {
|
|
85
85
|
if (type.type === "Struct") {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
90
|
-
return StructType(fields);
|
|
86
|
+
// The fields in the struct's order, as a list: an object would list a
|
|
87
|
+
// field named like an integer first (#1574)
|
|
88
|
+
return StructType(Object.keys(type.fields).map((key) => [key, DataRefType]));
|
|
91
89
|
}
|
|
92
90
|
else {
|
|
93
91
|
throw new Error(`DataTreeType not implemented for type .${type.type}`);
|
package/dist/src/dataset.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataset.js","sourceRoot":"","sources":["../../src/dataset.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAK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AY,EAAE,IAAI,CAAC,CAAC;AAElE;;;;GAIG;AACH,MAAM,CAAC,MAAM,OAAO,GAAY,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AAyBtD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,YAAY,CAAqB,IAAO;IACtD,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC3B,sEAAsE;QACtE,4CAA4C;QAC5C,OAAO,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,WAAW,CAAU,CAAC,CAAoB,CAAC;IAC3G,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,KAAK,CAAC,0CAA0C,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IACzE,CAAC;AACH,CAAC"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ export { RepositoryRecordType, type RepositoryRecord, RepositoryUpgradeProgressT
|
|
|
39
39
|
export { E3_RELEASE, compareReleases } from './release.js';
|
|
40
40
|
export { type NamedKind, type HashKind, type IdKind, type IdentifierKind, nameProblem } from './names.js';
|
|
41
41
|
export { TRANSFER_PROTOCOL_VERSION, transferPartCount, transferPartRange, TransferUploadRequestType, type TransferUploadRequest, TransferUploadResponseType, type TransferUploadResponse, TransferPartResponseType, type TransferPartResponse, TransferDoneResponseType, type TransferDoneResponse, } from './transfer.js';
|
|
42
|
-
export { isCollectionRoot, encodeDatasetBlob, writeCollectionManifest,
|
|
42
|
+
export { isCollectionRoot, encodeDatasetBlob, writeCollectionManifest, SEGMENT_WRITE_BATCH, type CollectionSegmentRef, type CollectionPiece, type SegmentSink, } from './dataset-blob.js';
|
|
43
43
|
export { COLLECTION_MANIFEST_KIND, CollectionManifestType, CollectionManifestEntryType, type CollectionManifest, type CollectionManifestEntry, isCollectionManifestType, isCollectionManifest, encodeCollectionManifest, decodeCollectionManifest, manifestElementCount, manifestByteSize, } from './collection-manifest.js';
|
|
44
44
|
export { checkDatasetType, datasetAddress, type DatasetTypeMismatch, } from './dataset-type.js';
|
|
45
45
|
export { BEAST2_CONTENT_TYPE } from './constants.js';
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,EACL,WAAW,EACX,KAAK,OAAO,EACZ,aAAa,EACb,OAAO,EACP,YAAY,GACb,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,iBAAiB,EACjB,KAAK,aAAa,EAClB,cAAc,EACd,KAAK,UAAU,GAChB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,KAAK,UAAU,EACf,gBAAgB,EAChB,YAAY,EACZ,KAAK,QAAQ,EACb,iBAAiB,EACjB,KAAK,aAAa,EAClB,aAAa,EACb,KAAK,SAAS,EACd,kBAAkB,EAClB,KAAK,cAAc,EACnB,cAAc,EACd,KAAK,UAAU,EACf,gBAAgB,EAChB,KAAK,YAAY,EACjB,YAAY,EACZ,KAAK,QAAQ,GACd,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,mBAAmB,EACnB,KAAK,eAAe,EACpB,qBAAqB,EACrB,KAAK,iBAAiB,EACtB,mBAAmB,EACnB,KAAK,eAAe,EACpB,oBAAoB,EACpB,KAAK,gBAAgB,EACrB,oBAAoB,EACpB,KAAK,gBAAgB,EACrB,4BAA4B,EAC5B,KAAK,wBAAwB,EAC7B,2BAA2B,GAC5B,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,aAAa,EACb,KAAK,SAAS,EACd,eAAe,EACf,KAAK,WAAW,EAChB,YAAY,EACZ,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,sBAAsB,EA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,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,UAAU,EACf,aAAa,EACb,KAAK,SAAS,EACd,qBAAqB,EACrB,KAAK,iBAAiB,EACtB,iBAAiB,EACjB,KAAK,aAAa,EAClB,aAAa,EACb,KAAK,SAAS,EACd,iBAAiB,EACjB,KAAK,aAAa,EAClB,kBAAkB,EAClB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,iBAAiB,EACjB,KAAK,aAAa,EAClB,aAAa,EACb,mBAAmB,EACnB,0BAA0B,EAC1B,KAAK,sBAAsB,EAC3B,4BAA4B,EAC5B,yBAAyB,EACzB,KAAK,qBAAqB,EAC1B,qBAAqB,EACrB,gBAAgB,EAChB,YAAY,EAEZ,qBAAqB,EACrB,KAAK,iBAAiB,EACtB,uBAAuB,EACvB,KAAK,mBAAmB,EACxB,sBAAsB,EACtB,KAAK,kBAAkB,EACvB,eAAe,EACf,KAAK,WAAW,GACjB,MAAM,eAAe,CAAC;AAIvB,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAG1E,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,KAAK,aAAa,EAClB,iBAAiB,EACjB,KAAK,aAAa,EAClB,YAAY,EACZ,KAAK,QAAQ,EACb,cAAc,EACd,cAAc,GACf,MAAM,gBAAgB,CAAC"}
|
package/dist/src/index.js
CHANGED
|
@@ -63,7 +63,7 @@ export { nameProblem } from './names.js';
|
|
|
63
63
|
export { TRANSFER_PROTOCOL_VERSION, transferPartCount, transferPartRange, TransferUploadRequestType, TransferUploadResponseType, TransferPartResponseType, TransferDoneResponseType, } from './transfer.js';
|
|
64
64
|
// Dataset blob encoding — the ONE branch deciding segmentation, shared by the
|
|
65
65
|
// store's door (e3-core `storeCollection`) and the package export (e3 `export_`)
|
|
66
|
-
export { isCollectionRoot, encodeDatasetBlob, writeCollectionManifest,
|
|
66
|
+
export { isCollectionRoot, encodeDatasetBlob, writeCollectionManifest, SEGMENT_WRITE_BATCH, } from './dataset-blob.js';
|
|
67
67
|
// The segment-object layout: a collection dataset is a manifest naming
|
|
68
68
|
// standalone segment objects, and the manifest is what the ref points at
|
|
69
69
|
export { COLLECTION_MANIFEST_KIND, CollectionManifestType, CollectionManifestEntryType, isCollectionManifestType, isCollectionManifest, encodeCollectionManifest, decodeCollectionManifest, manifestElementCount, manifestByteSize, } from './collection-manifest.js';
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AAEH,4BAA4B;AAC5B,OAAO,EACL,WAAW,EAEX,aAAa,EACb,OAAO,EACP,YAAY,GACb,MAAM,cAAc,CAAC;AAEtB,2DAA2D;AAC3D,OAAO,EACL,iBAAiB,EAEjB,cAAc,GAEf,MAAM,kBAAkB,CAAC;AAE1B,mBAAmB;AACnB,OAAO,EACL,gBAAgB,EAChB,cAAc,EAEd,gBAAgB,EAChB,YAAY,EAEZ,iBAAiB,EAEjB,aAAa,EAEb,kBAAkB,EAElB,cAAc,EAEd,gBAAgB,EAEhB,YAAY,GAEb,MAAM,WAAW,CAAC;AAEnB,yBAAyB;AACzB,OAAO,EACL,mBAAmB,EAEnB,qBAAqB,EAErB,mBAAmB,EAEnB,oBAAoB,EAEpB,oBAAoB,EAEpB,4BAA4B,EAE5B,2BAA2B,GAC5B,MAAM,kBAAkB,CAAC;AAE1B,2BAA2B;AAC3B,OAAO,EACL,aAAa,EAEb,eAAe,EAEf,YAAY,EAKZ,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,gB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AkB,EAClB,0BAA0B,EAC1B,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,GAkFvB,MAAM,UAAU,CAAC;AAElB,2BAA2B;AAC3B,OAAO,EAGL,aAAa,EAEb,qBAAqB,EAErB,iBAAiB,EAEjB,aAAa,EAEb,iBAAiB,EAEjB,kBAAkB,EAGlB,iBAAiB,EAEjB,aAAa,EACb,mBAAmB,EACnB,0BAA0B,EAE1B,4BAA4B,EAC5B,yBAAyB,EAEzB,qBAAqB,EACrB,gBAAgB,EAChB,YAAY;AACZ,uBAAuB;AACvB,qBAAqB,EAErB,uBAAuB,EAEvB,sBAAsB,EAEtB,eAAe,GAEhB,MAAM,eAAe,CAAC;AAEvB,wEAAwE;AACxE,iDAAiD;AACjD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAmB,MAAM,aAAa,CAAC;AAE1E,+CAA+C;AAC/C,OAAO,EACL,cAAc,EACd,iBAAiB,EAEjB,iBAAiB,EAEjB,YAAY,EAEZ,cAAc,EACd,cAAc,GACf,MAAM,gBAAgB,CAAC"}
|
package/dist/src/release.d.ts
CHANGED
package/dist/src/release.js
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* release beside this one.
|
|
16
16
|
*/
|
|
17
17
|
/** The release of e3 this build is. */
|
|
18
|
-
export const E3_RELEASE = '1.0.
|
|
18
|
+
export const E3_RELEASE = '1.0.107';
|
|
19
19
|
/** A semantic version: its core, a pre-release, and build metadata. */
|
|
20
20
|
const RELEASE = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/;
|
|
21
21
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elaraai/e3-types",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.107",
|
|
4
4
|
"description": "Shared type definitions for e3 (East Execution Engine)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"directory": "libs/e3/packages/e3-types"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
|
-
"@elaraai/east": "1.0.
|
|
21
|
+
"@elaraai/east": "1.0.107"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/node": "^22.0.0",
|
package/src/dataset-blob.spec.ts
CHANGED
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
encodeBeast2PagedFor,
|
|
26
26
|
sha256Hex,
|
|
27
27
|
} from '@elaraai/east';
|
|
28
|
-
import { encodeDatasetBlob, writeCollectionManifest, type CollectionSegmentRef } from './dataset-blob.js';
|
|
28
|
+
import { encodeDatasetBlob, writeCollectionManifest, type CollectionSegmentRef, type SegmentSink } from './dataset-blob.js';
|
|
29
29
|
|
|
30
30
|
const TableType = DictType(StringType, IntegerType);
|
|
31
31
|
|
|
@@ -36,29 +36,32 @@ function rowsOf(n: number): SortedMap<string, bigint> {
|
|
|
36
36
|
compareFor(StringType));
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
/** A
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
/** A sink that stores nothing, and answers each object's hash. */
|
|
40
|
+
const hashing: SegmentSink = (batch) => Promise.resolve(batch.map((bytes) => sha256Hex(bytes)));
|
|
41
|
+
|
|
42
|
+
/** A batch the test ends, as the store would: stored, or failed. */
|
|
43
|
+
interface HeldBatch {
|
|
44
|
+
hashes: string[];
|
|
42
45
|
end: (failure?: Error) => void;
|
|
43
46
|
}
|
|
44
47
|
|
|
45
|
-
/** A sink whose
|
|
46
|
-
* flight, and the
|
|
47
|
-
function heldSink(): { sink:
|
|
48
|
-
const open:
|
|
49
|
-
const calls: string[] = [];
|
|
50
|
-
const sink = (
|
|
51
|
-
const
|
|
52
|
-
calls.push(
|
|
53
|
-
const
|
|
54
|
-
|
|
48
|
+
/** A sink whose batches are held until the test ends each one: the batches in
|
|
49
|
+
* flight, and the hashes of every batch it was handed, in order. */
|
|
50
|
+
function heldSink(): { sink: SegmentSink; open: HeldBatch[]; calls: string[][] } {
|
|
51
|
+
const open: HeldBatch[] = [];
|
|
52
|
+
const calls: string[][] = [];
|
|
53
|
+
const sink: SegmentSink = (batch) => new Promise((resolve, reject) => {
|
|
54
|
+
const hashes = batch.map((bytes) => sha256Hex(bytes));
|
|
55
|
+
calls.push(hashes);
|
|
56
|
+
const held: HeldBatch = {
|
|
57
|
+
hashes,
|
|
55
58
|
end: (failure) => {
|
|
56
|
-
open.splice(open.indexOf(
|
|
57
|
-
if (failure === undefined) resolve(
|
|
59
|
+
open.splice(open.indexOf(held), 1);
|
|
60
|
+
if (failure === undefined) resolve(hashes);
|
|
58
61
|
else reject(failure);
|
|
59
62
|
},
|
|
60
63
|
};
|
|
61
|
-
open.push(
|
|
64
|
+
open.push(held);
|
|
62
65
|
});
|
|
63
66
|
return { sink, open, calls };
|
|
64
67
|
}
|
|
@@ -83,11 +86,11 @@ describe('writeCollectionManifest', () => {
|
|
|
83
86
|
Array.from({ length: 20_000 }, (_, i): [string, bigint] => [`k${String(i).padStart(6, '0')}`, BigInt(i)]),
|
|
84
87
|
compareFor(StringType));
|
|
85
88
|
const objects = new Map<string, Uint8Array>();
|
|
86
|
-
const manifest = await writeCollectionManifest(TableType, [{ elements: value.entries() }], async (bytes) => {
|
|
89
|
+
const manifest = await writeCollectionManifest(TableType, [{ elements: value.entries() }], async (batch) => batch.map((bytes) => {
|
|
87
90
|
const hash = sha256Hex(bytes);
|
|
88
91
|
objects.set(hash, bytes);
|
|
89
92
|
return hash;
|
|
90
|
-
});
|
|
93
|
+
}));
|
|
91
94
|
|
|
92
95
|
const expectedObjects = new Map<string, Uint8Array>();
|
|
93
96
|
let expected: Uint8Array | undefined;
|
|
@@ -108,11 +111,11 @@ describe('writeCollectionManifest', () => {
|
|
|
108
111
|
Array.from({ length: 20_000 }, (_, i): [string, bigint] => [`k${String(i).padStart(6, '0')}`, BigInt(i)]),
|
|
109
112
|
compareFor(StringType));
|
|
110
113
|
const objects = new Map<string, Uint8Array>();
|
|
111
|
-
const sink = async (bytes
|
|
114
|
+
const sink: SegmentSink = async (batch) => batch.map((bytes) => {
|
|
112
115
|
const hash = sha256Hex(bytes);
|
|
113
116
|
objects.set(hash, bytes);
|
|
114
117
|
return hash;
|
|
115
|
-
};
|
|
118
|
+
});
|
|
116
119
|
const whole = await writeCollectionManifest(TableType, [{ elements: value.entries() }], sink);
|
|
117
120
|
const entries = decodeCollectionManifest(whole).entries;
|
|
118
121
|
const half = entries.length >> 1;
|
|
@@ -134,10 +137,10 @@ describe('writeCollectionManifest', () => {
|
|
|
134
137
|
const again = await writeCollectionManifest(TableType, [
|
|
135
138
|
{ segments: carried },
|
|
136
139
|
{ elements: value.entries(decodeBeast2FenceFor(StringType)(entries[half]!.fence) as string) },
|
|
137
|
-
], async (
|
|
138
|
-
const
|
|
139
|
-
written.add(hash);
|
|
140
|
-
return
|
|
140
|
+
], async (batch) => {
|
|
141
|
+
const hashes = await sink(batch);
|
|
142
|
+
for (const hash of hashes) written.add(hash);
|
|
143
|
+
return hashes;
|
|
141
144
|
});
|
|
142
145
|
|
|
143
146
|
assert.deepEqual(again, whole, 'the same manifest');
|
|
@@ -145,34 +148,45 @@ describe('writeCollectionManifest', () => {
|
|
|
145
148
|
for (const entry of entries.slice(0, half)) assert.ok(!written.has(entry.hash), `segment ${entry.hash.slice(0, 8)} is carried`);
|
|
146
149
|
});
|
|
147
150
|
|
|
148
|
-
it('
|
|
151
|
+
it('hands the sink the objects in order, in full batches, one in flight while the next is gathered, and returns once every one is stored', async () => {
|
|
149
152
|
const value = rowsOf(20_000);
|
|
150
|
-
const expected = await writeCollectionManifest(TableType, [{ elements: value.entries() }],
|
|
151
|
-
const entries = decodeCollectionManifest(expected)
|
|
152
|
-
const objects = entries.length + 1;
|
|
153
|
+
const expected = await writeCollectionManifest(TableType, [{ elements: value.entries() }], hashing);
|
|
154
|
+
const { entries, header } = decodeCollectionManifest(expected);
|
|
153
155
|
const { sink, open, calls } = heldSink();
|
|
154
156
|
let manifest: Uint8Array | undefined;
|
|
155
|
-
const writing = writeCollectionManifest(TableType, [{ elements: value.entries() }], sink, {
|
|
157
|
+
const writing = writeCollectionManifest(TableType, [{ elements: value.entries() }], sink, { batch: 3 })
|
|
156
158
|
.then((bytes) => {
|
|
157
159
|
manifest = bytes;
|
|
158
160
|
});
|
|
159
161
|
|
|
160
|
-
// Each
|
|
161
|
-
//
|
|
162
|
-
// has as many in flight as it may: three, or the objects left.
|
|
162
|
+
// Each batch is stored only when the test ends it. Between ends, one batch
|
|
163
|
+
// is in flight, and the writer sends the next only once it is stored.
|
|
163
164
|
while (manifest === undefined) {
|
|
164
|
-
|
|
165
|
-
await until(() => manifest !== undefined || open.length === inFlight(), 'as many writes in flight as may be');
|
|
165
|
+
await until(() => manifest !== undefined || open.length > 0, 'a batch in flight');
|
|
166
166
|
await turns(20);
|
|
167
167
|
if (manifest !== undefined) break;
|
|
168
|
-
assert.equal(open.length,
|
|
169
|
-
open
|
|
168
|
+
assert.equal(open.length, 1, `${open.length} batches in flight, of ${calls.length} sent`);
|
|
169
|
+
open[0]!.end();
|
|
170
170
|
}
|
|
171
171
|
await writing;
|
|
172
172
|
|
|
173
|
-
assert.deepEqual(manifest, expected, 'the manifest a write
|
|
174
|
-
assert.deepEqual(calls, [...entries.map((entry) => entry.hash),
|
|
175
|
-
|
|
173
|
+
assert.deepEqual(manifest, expected, 'the manifest a write of each object writes, each entry in its place');
|
|
174
|
+
assert.deepEqual(calls.flat(), [...entries.map((entry) => entry.hash), header], 'the segments, in order, and then the header');
|
|
175
|
+
assert.ok(calls.slice(0, -1).every((batch) => batch.length === 3), 'every batch but the last is full');
|
|
176
|
+
assert.ok(calls.at(-1)!.length <= 3, 'and the last holds what is left');
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
it('hands a collection of a few segments to the sink in one batch', async () => {
|
|
180
|
+
const value = rowsOf(4_000);
|
|
181
|
+
const { entries, header } = decodeCollectionManifest(await writeCollectionManifest(TableType, [{ elements: value.entries() }], hashing));
|
|
182
|
+
assert.ok(entries.length > 1, 'the value spans segments');
|
|
183
|
+
const calls: string[][] = [];
|
|
184
|
+
await writeCollectionManifest(TableType, [{ elements: value.entries() }], async (batch) => {
|
|
185
|
+
const hashes = await hashing(batch);
|
|
186
|
+
calls.push(hashes);
|
|
187
|
+
return hashes;
|
|
188
|
+
});
|
|
189
|
+
assert.deepEqual(calls, [[...entries.map((entry) => entry.hash), header]]);
|
|
176
190
|
});
|
|
177
191
|
|
|
178
192
|
/** A writer's failure, once it has failed: read through a function, which
|
|
@@ -187,57 +201,59 @@ describe('writeCollectionManifest', () => {
|
|
|
187
201
|
return () => settled;
|
|
188
202
|
}
|
|
189
203
|
|
|
190
|
-
it('
|
|
204
|
+
it('sends no batch after one fails, and throws its failure', async () => {
|
|
191
205
|
const { sink, open, calls } = heldSink();
|
|
192
|
-
const writing = writeCollectionManifest(TableType, [{ elements: rowsOf(20_000).entries() }], sink, {
|
|
206
|
+
const writing = writeCollectionManifest(TableType, [{ elements: rowsOf(20_000).entries() }], sink, { batch: 3 });
|
|
193
207
|
const settled = failureOf(writing);
|
|
194
|
-
await until(() => open.length ===
|
|
195
|
-
|
|
196
|
-
open[1]!.end(failure);
|
|
208
|
+
await until(() => open.length === 1, 'a batch in flight');
|
|
209
|
+
// The next batch gathered, waiting for this one
|
|
197
210
|
await turns(20);
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
await writing.catch(() => {});
|
|
211
|
+
const failure = new Error('the store is gone');
|
|
212
|
+
open[0]!.end(failure);
|
|
213
|
+
await until(() => settled() !== undefined, "the writer's end");
|
|
214
|
+
assert.equal(calls.length, 1, 'nothing is sent after a batch fails');
|
|
203
215
|
assert.equal(settled()?.failure, failure);
|
|
204
216
|
});
|
|
205
217
|
|
|
206
|
-
it(
|
|
218
|
+
it("throws a failure of the last batch, the header's", async () => {
|
|
207
219
|
const value = rowsOf(20_000);
|
|
208
|
-
const { header } = decodeCollectionManifest(
|
|
209
|
-
await writeCollectionManifest(TableType, [{ elements: value.entries() }], async (bytes) => sha256Hex(bytes)));
|
|
220
|
+
const { header } = decodeCollectionManifest(await writeCollectionManifest(TableType, [{ elements: value.entries() }], hashing));
|
|
210
221
|
const { sink, open } = heldSink();
|
|
211
|
-
const writing = writeCollectionManifest(TableType, [{ elements: value.entries() }], sink, {
|
|
222
|
+
const writing = writeCollectionManifest(TableType, [{ elements: value.entries() }], sink, { batch: 3 });
|
|
212
223
|
const settled = failureOf(writing);
|
|
213
|
-
// Every
|
|
224
|
+
// Every batch is stored but the one holding the header, the last sent.
|
|
214
225
|
const failure = new Error('the store is gone');
|
|
215
226
|
for (;;) {
|
|
216
|
-
await until(() => settled() !== undefined || open.length > 0, 'a
|
|
227
|
+
await until(() => settled() !== undefined || open.length > 0, 'a batch in flight, or the writer\'s end');
|
|
217
228
|
if (settled() !== undefined) break;
|
|
218
|
-
const
|
|
219
|
-
|
|
229
|
+
const batch = open[0]!;
|
|
230
|
+
batch.end(batch.hashes.includes(header) ? failure : undefined);
|
|
220
231
|
}
|
|
221
232
|
assert.equal(settled()?.failure, failure);
|
|
222
233
|
});
|
|
223
234
|
|
|
224
|
-
it('throws a piece\'s failure once the
|
|
225
|
-
|
|
226
|
-
//
|
|
235
|
+
it('throws a piece\'s failure once the batch in flight has ended', async () => {
|
|
236
|
+
// A batch larger than half the segments the rows before the one out of
|
|
237
|
+
// order are cut into, and no larger than they: one batch is sent, and the
|
|
238
|
+
// next is never full, so the row out of order is read with a batch in flight.
|
|
239
|
+
const segments = decodeCollectionManifest(await writeCollectionManifest(TableType, [{ elements: rowsOf(20_000).entries() }], hashing))
|
|
240
|
+
.entries.length;
|
|
241
|
+
const { sink, open, calls } = heldSink();
|
|
227
242
|
let disordered = false;
|
|
228
243
|
function* rows(): Generator<[string, bigint]> {
|
|
229
244
|
yield* rowsOf(20_000).entries();
|
|
230
245
|
disordered = true;
|
|
231
246
|
yield ['a', 0n];
|
|
232
247
|
}
|
|
233
|
-
const writing = writeCollectionManifest(TableType, [{ elements: rows() }], sink, {
|
|
248
|
+
const writing = writeCollectionManifest(TableType, [{ elements: rows() }], sink, { batch: (segments >> 1) + 1 });
|
|
234
249
|
const settled = failureOf(writing);
|
|
235
250
|
await until(() => disordered, 'the row out of order');
|
|
236
251
|
await turns(20);
|
|
237
|
-
assert.
|
|
238
|
-
assert.equal(
|
|
252
|
+
assert.equal(calls.length, 1, 'one batch is sent');
|
|
253
|
+
assert.equal(open.length, 1, 'and in flight');
|
|
254
|
+
assert.equal(settled(), undefined, 'the writer waits for the batch in flight');
|
|
239
255
|
|
|
240
|
-
|
|
256
|
+
open[0]!.end();
|
|
241
257
|
await writing.catch(() => {});
|
|
242
258
|
const failure = settled()?.failure;
|
|
243
259
|
assert.ok(failure instanceof Error, 'the piece\'s failure');
|
|
@@ -255,9 +271,9 @@ describe('encodeDatasetBlob', () => {
|
|
|
255
271
|
const whole = encodeBeast2For(RowType)(row);
|
|
256
272
|
assert.deepEqual(encodeDatasetBlob(RowType, row), whole);
|
|
257
273
|
const sunk: Uint8Array[] = [];
|
|
258
|
-
assert.deepEqual(await encodeDatasetBlob(RowType, row, async (
|
|
259
|
-
sunk.push(
|
|
260
|
-
return
|
|
274
|
+
assert.deepEqual(await encodeDatasetBlob(RowType, row, async (batch) => {
|
|
275
|
+
sunk.push(...batch);
|
|
276
|
+
return hashing(batch);
|
|
261
277
|
}), whole, 'a sink changes nothing for a value that is not a collection');
|
|
262
278
|
assert.deepEqual(sunk, []);
|
|
263
279
|
});
|
package/src/dataset-blob.ts
CHANGED
|
@@ -50,67 +50,92 @@ import {
|
|
|
50
50
|
} from './collection-manifest.js';
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
|
-
* Writes one
|
|
53
|
+
* Writes a batch of objects, no one of which names another, and answers their
|
|
54
|
+
* content hashes in the order given.
|
|
54
55
|
*
|
|
55
56
|
* @remarks
|
|
56
57
|
* The whole of the object store this module needs. Content-addressed, so
|
|
57
58
|
* writing bytes already stored is a no-op that returns the same hash — which is
|
|
58
|
-
* exactly how a new state shares its unchanged segments with the old one.
|
|
59
|
+
* exactly how a new state shares its unchanged segments with the old one. A
|
|
60
|
+
* store whose writes are requests sends a batch as a few (e3-core's
|
|
61
|
+
* `ObjectStore.writeMany`).
|
|
59
62
|
*/
|
|
60
|
-
export type SegmentSink = (
|
|
63
|
+
export type SegmentSink = (objects: readonly Uint8Array[]) => Promise<string[]>;
|
|
61
64
|
|
|
62
65
|
/**
|
|
63
|
-
*
|
|
66
|
+
* The most objects {@link writeCollectionManifest} hands its sink in one batch,
|
|
64
67
|
* unless its caller says otherwise: a store whose writes are round trips is
|
|
65
68
|
* waited on once for this many segments, rather than once for each.
|
|
66
69
|
*/
|
|
67
|
-
export const
|
|
70
|
+
export const SEGMENT_WRITE_BATCH = 16;
|
|
68
71
|
|
|
69
72
|
/**
|
|
70
|
-
* The writes of one manifest's objects: each
|
|
71
|
-
* handed over,
|
|
72
|
-
*
|
|
73
|
+
* The writes of one manifest's objects, in batches: each object gathered in
|
|
74
|
+
* the order it is handed over, a batch sent once it holds `width` objects or
|
|
75
|
+
* the last object is handed over, one batch in flight while the next is
|
|
76
|
+
* gathered, and none left running once the manifest's writer returns.
|
|
73
77
|
*
|
|
74
78
|
* @internal
|
|
75
79
|
*/
|
|
76
80
|
class SinkWrites {
|
|
77
|
-
|
|
81
|
+
/** The objects gathered for the next batch, each with what it is told. */
|
|
82
|
+
private gathered: Array<{ bytes: Uint8Array; named: (hash: string) => void }> = [];
|
|
83
|
+
/** The batch in flight, which settles without throwing. */
|
|
84
|
+
private inFlight: Promise<void> | undefined;
|
|
78
85
|
private failure: { error: unknown } | undefined;
|
|
79
86
|
|
|
80
87
|
constructor(private readonly sink: SegmentSink, private readonly width: number) {}
|
|
81
88
|
|
|
82
89
|
/**
|
|
83
|
-
*
|
|
90
|
+
* Gathers `bytes` for the next batch, and sends the batch once it holds
|
|
91
|
+
* `width` objects and the batch before it is stored.
|
|
84
92
|
*
|
|
85
93
|
* @param bytes - The object
|
|
86
94
|
* @param named - Told the object's hash once it is stored
|
|
87
|
-
* @throws The
|
|
88
|
-
*
|
|
95
|
+
* @throws The failed batch's error, once one has failed: nothing more is
|
|
96
|
+
* sent after it.
|
|
89
97
|
*/
|
|
90
98
|
async start(bytes: Uint8Array, named: (hash: string) => void): Promise<void> {
|
|
91
|
-
while (this.failure === undefined && this.inFlight.size >= this.width) await Promise.race(this.inFlight);
|
|
92
99
|
if (this.failure !== undefined) throw this.failure.error;
|
|
93
|
-
|
|
94
|
-
|
|
100
|
+
this.gathered.push({ bytes, named });
|
|
101
|
+
if (this.gathered.length >= this.width) await this.send();
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Sends the objects gathered, once the batch in flight is stored.
|
|
106
|
+
*
|
|
107
|
+
* @throws The failed batch's error, once one has failed.
|
|
108
|
+
*/
|
|
109
|
+
private async send(): Promise<void> {
|
|
110
|
+
await this.settled();
|
|
111
|
+
if (this.failure !== undefined) throw this.failure.error;
|
|
112
|
+
const batch = this.gathered;
|
|
113
|
+
if (batch.length === 0) return;
|
|
114
|
+
this.gathered = [];
|
|
115
|
+
const sent: Promise<void> = this.sink(batch.map(({ bytes }) => bytes))
|
|
116
|
+
.then((hashes) => {
|
|
117
|
+
batch.forEach(({ named }, i) => named(hashes[i]!));
|
|
118
|
+
}, (error: unknown) => {
|
|
95
119
|
this.failure ??= { error };
|
|
96
120
|
})
|
|
97
121
|
.finally(() => {
|
|
98
|
-
this.inFlight.
|
|
122
|
+
if (this.inFlight === sent) this.inFlight = undefined;
|
|
99
123
|
});
|
|
100
|
-
this.inFlight
|
|
124
|
+
this.inFlight = sent;
|
|
101
125
|
}
|
|
102
126
|
|
|
103
|
-
/** Waits for
|
|
127
|
+
/** Waits for the batch in flight, whatever its outcome. */
|
|
104
128
|
async settled(): Promise<void> {
|
|
105
|
-
|
|
129
|
+
while (this.inFlight !== undefined) await this.inFlight;
|
|
106
130
|
}
|
|
107
131
|
|
|
108
132
|
/**
|
|
109
|
-
*
|
|
133
|
+
* Sends what is gathered, and waits for every batch.
|
|
110
134
|
*
|
|
111
|
-
* @throws The
|
|
135
|
+
* @throws The failed batch's error.
|
|
112
136
|
*/
|
|
113
137
|
async stored(): Promise<void> {
|
|
138
|
+
await this.send();
|
|
114
139
|
await this.settled();
|
|
115
140
|
if (this.failure !== undefined) throw this.failure.error;
|
|
116
141
|
}
|
|
@@ -163,33 +188,35 @@ export type CollectionPiece = Beast2RecutPiece<EastType, CollectionSegmentRef>;
|
|
|
163
188
|
* Writer's own: a piece's segments are carried over only when that is the
|
|
164
189
|
* header they are under, which is the caller's to establish.
|
|
165
190
|
*
|
|
166
|
-
* The objects
|
|
167
|
-
* order, then the header —
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
*
|
|
191
|
+
* The objects go to the sink in batches of up to `batch` — the segments in
|
|
192
|
+
* order, then the header — one batch in flight while the next is gathered, so
|
|
193
|
+
* a collection of a few segments is one batch however its pieces arrive, and
|
|
194
|
+
* a large one keeps a batch in flight as it is cut. A batch is sent once it is
|
|
195
|
+
* full, or once the header is cut, and the manifest is returned once every
|
|
196
|
+
* object is stored, so the caller stores the manifest after the objects it
|
|
197
|
+
* names. Each segment's blob is held until its batch is stored.
|
|
171
198
|
*
|
|
172
199
|
* @param type - The collection type (Array / Set / Dict)
|
|
173
200
|
* @param pieces - The collection's pieces, in order
|
|
174
|
-
* @param sink - Writes
|
|
175
|
-
* @param options - `
|
|
176
|
-
* (default {@link
|
|
201
|
+
* @param sink - Writes a batch of objects and returns their hashes
|
|
202
|
+
* @param options - `batch`, the most objects the sink is handed at once
|
|
203
|
+
* (default {@link SEGMENT_WRITE_BATCH})
|
|
177
204
|
* @returns The manifest's bytes — the caller stores them, and its hash is the
|
|
178
205
|
* dataset's content address
|
|
179
206
|
* @throws {Error} When a piece's elements do not ascend (Set / Dict), a
|
|
180
207
|
* segment's blob is not the one segment its reference describes, or the sink
|
|
181
|
-
* rejects: once the
|
|
208
|
+
* rejects: once the batch in flight has ended, so none runs on after the
|
|
182
209
|
* writer returns.
|
|
183
210
|
*/
|
|
184
211
|
export async function writeCollectionManifest(
|
|
185
212
|
type: EastType | EastTypeValue,
|
|
186
213
|
pieces: Iterable<CollectionPiece> | AsyncIterable<CollectionPiece>,
|
|
187
214
|
sink: SegmentSink,
|
|
188
|
-
options: {
|
|
215
|
+
options: { batch?: number } = {},
|
|
189
216
|
): Promise<Uint8Array> {
|
|
190
217
|
const typeValue = asTypeValue(type);
|
|
191
218
|
const entries: CollectionManifestEntry[] = [];
|
|
192
|
-
const writes = new SinkWrites(sink, options.
|
|
219
|
+
const writes = new SinkWrites(sink, options.batch ?? SEGMENT_WRITE_BATCH);
|
|
193
220
|
/** Writes a segment the manifest names at the place it takes now. */
|
|
194
221
|
const write = (blob: Uint8Array, fence: Uint8Array, count: number): Promise<void> => {
|
|
195
222
|
const at = entries.push({ hash: '', fence, count: BigInt(count), bytes: BigInt(blob.byteLength) }) - 1;
|
|
@@ -246,7 +273,7 @@ export async function writeCollectionManifest(
|
|
|
246
273
|
*
|
|
247
274
|
* @param type - The dataset's declared type (an `EastType` or its homoiconic value)
|
|
248
275
|
* @param value - The value to encode
|
|
249
|
-
* @param sink - Writes
|
|
276
|
+
* @param sink - Writes a batch of objects and returns their hashes
|
|
250
277
|
* @returns The beast2 bytes to store — the manifest, for a collection written
|
|
251
278
|
* through a sink; otherwise the value's own blob
|
|
252
279
|
*/
|
package/src/dataset.ts
CHANGED
|
@@ -115,11 +115,9 @@ export type DataTreeType<T extends EastType> =
|
|
|
115
115
|
*/
|
|
116
116
|
export function DataTreeType<T extends EastType>(type: T): DataTreeType<T> {
|
|
117
117
|
if (type.type === "Struct") {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
122
|
-
return StructType(fields) as DataTreeType<T>;
|
|
118
|
+
// The fields in the struct's order, as a list: an object would list a
|
|
119
|
+
// field named like an integer first (#1574)
|
|
120
|
+
return StructType(Object.keys(type.fields).map((key) => [key, DataRefType] as const)) as DataTreeType<T>;
|
|
123
121
|
} else {
|
|
124
122
|
throw new Error(`DataTreeType not implemented for type .${type.type}`);
|
|
125
123
|
}
|
package/src/index.ts
CHANGED
package/src/release.ts
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
/** The release of e3 this build is. */
|
|
20
|
-
export const E3_RELEASE = '1.0.
|
|
20
|
+
export const E3_RELEASE = '1.0.107';
|
|
21
21
|
|
|
22
22
|
/** A semantic version: its core, a pre-release, and build metadata. */
|
|
23
23
|
const RELEASE = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/;
|