-
Notifications
You must be signed in to change notification settings - Fork 0
Cycle 0008: Stream architecture + P5 codec dissolution #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
392d4fc
7dd54eb
924e62e
9cbf41c
9b1a827
3052bc0
22a0098
1e76c48
6860653
18ea06b
ca2db85
4cf9ed9
a28d81a
1da9e42
2b53d1a
359ea14
6955db8
5756abe
412c6f6
39cb85b
3520de2
b5da62a
e71bc56
c197d4c
825ef6d
a95ad58
8fabdce
1bc79ed
69d98df
d854d61
4a42421
1b2e614
7d5af95
1bee37f
8f79554
3134b31
590a7c7
b7f6af2
9aeeb52
bf9eccf
6e95376
b1b687e
7c88755
d72d97d
097fa3d
d2d8d8d
5cb8e1d
88ba040
86ff6dd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- CborPatchJournalAdapter: validate codec, blobPort - CborCheckpointStoreAdapter: validate codec, blobPort - CborEncodeTransform: validate codec - CborDecodeTransform: validate codec - GitBlobWriteTransform: validate blobPort - TreeAssemblerSink: validate treePort - IndexShardEncodeTransform: validate codec - Sink.consume(): validate source param - PatchBuilderV2: replace generic Error with PersistenceError (E_MISSING_JOURNAL) - CheckpointStorePort: remove misleading treeOid from CheckpointWriteResult
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -64,17 +64,21 @@ export default class LogicalIndexBuildService { | |
| buildStream(state, options = {}) { | ||
| const { indexBuilder, propBuilder } = this._populateBuilders(state, options); | ||
|
|
||
| // Collect shards once — generators yield fresh iterators on each call, | ||
| // so calling yieldShards() twice would re-iterate all bitmaps. | ||
| const indexShards = [...indexBuilder.yieldShards()]; | ||
| const receiptShard = indexShards.find((s) => s instanceof ReceiptShard); | ||
| if (!receiptShard) { | ||
| throw new Error('LogicalIndexBuildService: index builder did not emit a ReceiptShard'); | ||
| } | ||
|
|
||
| // Merge both builders' shard streams | ||
| const stream = WarpStream.mux( | ||
| WarpStream.from(indexBuilder.yieldShards()), | ||
| WarpStream.from(indexShards), | ||
| WarpStream.from(propBuilder.yieldShards()), | ||
| ); | ||
|
Comment on lines
+67
to
+79
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
🤖 Prompt for AI Agents |
||
|
|
||
| // Extract receipt from the index builder (it's deterministic, no need to decode) | ||
| const shards = [...indexBuilder.yieldShards()]; | ||
| const receiptShard = /** @type {ReceiptShard} */ (shards.find((s) => s instanceof ReceiptShard)); | ||
|
|
||
| return { stream, receipt: receiptShard }; | ||
| return { stream, receipt: /** @type {ReceiptShard} */ (receiptShard) }; | ||
| } | ||
|
|
||
| /** | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.