@delali/narsil 0.4.5 → 0.4.6-next.332
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/browser/{chunk-263ERYKA.mjs → chunk-DJDBJB2U.mjs} +1 -1
- package/dist/browser/{storage-leaf-42IZEOJJ.mjs → storage-leaf-72PEG6IP.mjs} +20 -12
- package/dist/{chunk-7SMVY4AX.mjs → chunk-3GWUUKDJ.mjs} +11 -11
- package/dist/{chunk-3PO2MOFY.mjs → chunk-57MN2UAL.mjs} +1 -1
- package/dist/{chunk-H7IIA2KL.mjs → chunk-7DW2ITZ3.mjs} +1 -1
- package/dist/{chunk-GDCTK5LU.mjs → chunk-AQI4DIFA.mjs} +2 -2
- package/dist/{chunk-7HVZVD2N.mjs → chunk-AWMO3NKJ.mjs} +1 -1
- package/dist/{chunk-XX4SKT54.mjs → chunk-BOTZ2GSW.mjs} +9 -9
- package/dist/{chunk-BVLR6S5J.mjs → chunk-CN42TL6V.mjs} +5 -5
- package/dist/{chunk-VV6P6LKJ.mjs → chunk-CZHAPGVH.mjs} +2 -2
- package/dist/{chunk-C3OQQ3M6.mjs → chunk-DVFCDOXW.mjs} +1 -1
- package/dist/{chunk-CPAE2QJP.mjs → chunk-EDZJNZKV.mjs} +1 -1
- package/dist/{chunk-REM3KDXN.mjs → chunk-FWZ5OK5G.mjs} +4 -4
- package/dist/{chunk-PBUME456.mjs → chunk-G6P6YTTW.mjs} +1 -1
- package/dist/{chunk-RXQZ53NV.mjs → chunk-GTB2S2VX.mjs} +1 -1
- package/dist/{chunk-KGLBLKYF.mjs → chunk-HWIIMLLR.mjs} +64 -49
- package/dist/{chunk-UDDZVZTV.mjs → chunk-JASE2FE6.mjs} +2 -2
- package/dist/{chunk-ICOCO7R4.mjs → chunk-JXRMHWQU.mjs} +1 -1
- package/dist/{chunk-AAH5CD3M.mjs → chunk-MUBQER6D.mjs} +1 -1
- package/dist/{chunk-ZGGZXRGM.mjs → chunk-NNRDQYBD.mjs} +8 -8
- package/dist/{chunk-DEYEVTFV.mjs → chunk-ONDHZ4WW.mjs} +2 -2
- package/dist/{chunk-FAK7Y3OX.mjs → chunk-PM2UOKYB.mjs} +3 -3
- package/dist/{chunk-3Q6CDT32.mjs → chunk-RBHEMWN6.mjs} +2 -2
- package/dist/{chunk-CP4ZQR2X.mjs → chunk-UAITBI74.mjs} +2 -2
- package/dist/{chunk-UQFWTROO.mjs → chunk-VIHHCXBO.mjs} +3 -3
- package/dist/{chunk-GLPBA2YZ.mjs → chunk-WCGFMFWK.mjs} +2 -2
- package/dist/{chunk-6RNOECOF.mjs → chunk-WRDGPEN6.mjs} +2 -2
- package/dist/{direct-executor-TWLEPVQO.mjs → direct-executor-3C5WFR33.mjs} +1 -1
- package/dist/distribution/coordinator/etcd.mjs +5 -1
- package/dist/distribution/transport/tcp.mjs +23 -18
- package/dist/distribution.mjs +391 -305
- package/dist/index.browser.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.react-native.mjs +1 -1
- package/dist/{long-query-thread-HK5FP64H.mjs → long-query-thread-C62WK6NI.mjs} +10 -10
- package/dist/{optional-writes-DPWRGFKK.mjs → optional-writes-AGDEVXC4.mjs} +3 -3
- package/dist/{paged-partition-archive-NITVFYOC.mjs → paged-partition-archive-EABR3N3F.mjs} +9 -9
- package/dist/partial-words.browser.mjs +1 -1
- package/dist/partial-words.mjs +1 -1
- package/dist/persistence/durability/checkpoint-worker.mjs +7 -7
- package/dist/{query-actions-AA5LE2WV.mjs → query-actions-QH5UQRCY.mjs} +1 -1
- package/dist/query-suggestions/merge-worker.mjs +4 -4
- package/dist/query-suggestions.browser.mjs +1 -1
- package/dist/query-suggestions.mjs +2 -2
- package/dist/react-native/chunks/{chunk-HGZNA5A6.mjs → chunk-ALSPAMEE.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-OVYLUGEW.mjs → chunk-BGRX5SPG.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-ZZQ2RIYZ.mjs → chunk-GPMPHDDO.mjs} +2 -2
- package/dist/react-native/chunks/{chunk-3BEUTRYM.mjs → chunk-NUOJ2EAK.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-574N6ERF.mjs → chunk-PTCHRZCP.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-6KVWTGEJ.mjs → chunk-V2H7EDTM.mjs} +8 -8
- package/dist/react-native/chunks/{optional-writes-UYVKLJU6.mjs → optional-writes-F4FJKEZ4.mjs} +2 -2
- package/dist/react-native/chunks/{restore-queue-AZIZ5ABX.mjs → restore-queue-MLFBOOZP.mjs} +4 -4
- package/dist/react-native/chunks/{segment-codec-leaf-TYO4LKQ6.mjs → segment-codec-leaf-Z3OS3B2K.mjs} +2 -2
- package/dist/react-native/chunks/{segment-merge-leaf-KM52IXXQ.mjs → segment-merge-leaf-TNHU77VW.mjs} +3 -3
- package/dist/react-native/chunks/{storage-leaf-HKJBZXIP.mjs → storage-leaf-NF733K7B.mjs} +25 -17
- package/dist/react-native/chunks/{store-leaf-LS5LT25L.mjs → store-leaf-UDKCNQB7.mjs} +3 -3
- package/dist/react-native/chunks/{suggestions-leaf-IJ3Z4EH3.mjs → suggestions-leaf-M6ITOPNM.mjs} +3 -3
- package/dist/react-native/chunks/{worker-copies-VNXZRBVW.mjs → worker-copies-GG7CKUBI.mjs} +2 -2
- package/dist/react-native/partial-words.mjs +1 -1
- package/dist/react-native/query-suggestions.mjs +1 -1
- package/dist/react-native/sync.mjs +1 -1
- package/dist/react-native/synonyms.mjs +1 -1
- package/dist/{rerank-X4HOST2N.mjs → rerank-LCMA5PZG.mjs} +1 -1
- package/dist/{restore-queue-CI72WRAF.mjs → restore-queue-NSA3RWF6.mjs} +4 -4
- package/dist/{segment-codec-leaf-7R5H2IYU.mjs → segment-codec-leaf-DQKKIN4F.mjs} +2 -2
- package/dist/{segment-merge-leaf-IWL4VH7C.mjs → segment-merge-leaf-67Z6OMRF.mjs} +2 -2
- package/dist/server.mjs +16 -16
- package/dist/{storage-leaf-6YCHFH2O.mjs → storage-leaf-FUH75D3X.mjs} +18 -18
- package/dist/{store-leaf-V5N2REHF.mjs → store-leaf-CKZFFFTX.mjs} +3 -3
- package/dist/{suggestions-leaf-XFJ4L37A.mjs → suggestions-leaf-NOSJIRSD.mjs} +5 -5
- package/dist/sync/filesystem.mjs +4 -4
- package/dist/sync.browser.mjs +1 -1
- package/dist/sync.mjs +1 -1
- package/dist/synonyms.browser.mjs +1 -1
- package/dist/synonyms.mjs +1 -1
- package/dist/{thread-UQAIJ5CS.mjs → thread-T5F3HSMC.mjs} +9 -9
- package/dist/{worker-copies-44MSY3IU.mjs → worker-copies-TPEHVXPI.mjs} +4 -4
- package/dist/workers/entry.mjs +7 -7
- package/package.json +5 -7
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ Narsil is an open source search engine with full-text, vector, hybrid, and geose
|
|
|
15
15
|
The engine partitions large indexes across workers and merges the results of the partitions into a single ranked list. This TypeScript package is the reference implementation of the `.nrsl` format, and [a Rust crate and a Go module](#other-languages) hold the same engine for programs in those languages.
|
|
16
16
|
|
|
17
17
|
<!-- BENCH:headline START -->
|
|
18
|
-
On BEIR SciFact, the BM25 ranking of Narsil's TypeScript server scores 0.681 nDCG@10, which is within 0.002 of the Anserini reference of 0.679. Elasticsearch scores 0.679 and OpenSearch scores 0.679 on the same queries. A paired significance test over those queries finds no significant difference between Narsil, Elasticsearch, and OpenSearch. On SciFact, Narsil's TypeScript server answers
|
|
18
|
+
On BEIR SciFact, the BM25 ranking of Narsil's TypeScript server scores 0.681 nDCG@10, which is within 0.002 of the Anserini reference of 0.679. Elasticsearch scores 0.679 and OpenSearch scores 0.679 on the same queries. A paired significance test over those queries finds no significant difference between Narsil, Elasticsearch, and OpenSearch. On SciFact, Narsil's TypeScript server answers 34,198 keyword queries a second at its peak, and OpenSearch follows with 8,713. Narsil's Rust server answers 56,315 keyword queries a second at its peak. On DBpedia entities 1M with every engine held at 0.99 recall, Narsil's TypeScript server answers 1,659 vector queries a second at its peak, and OpenSearch answers 1,719. Narsil's Rust server answers 1,971 vector queries a second at its peak. With each engine's recommended production settings on the same set, Narsil's TypeScript server answers 3,766 vector queries a second at its peak, and OpenSearch follows with 2,849. Narsil's Rust server answers 3,847 vector queries a second at its peak. Narsil has the highest peak throughput in 20 of the 20 keyword, vector, and hybrid comparisons in the newest recorded run: all 12 with every engine on equal settings, and all 8 with each engine's recommended production settings. The harness recorded these figures on 2026-11-19 in run `20261119T135007Z`. GCP c3-standard-8 hardware in us-central1-a, us-east1-b, us-east4-a, us-south1-b, us-west1-a, us-west2-a, us-west3-b, and us-west4-a hosted the engines. You'll find every dataset, every engine's settings, and the full method in [`BENCHMARKS.md`](https://github.com/assetcorp/narsil/blob/main/BENCHMARKS.md).
|
|
19
19
|
<!-- BENCH:headline END -->
|
|
20
20
|
|
|
21
21
|
Try it in your browser at [narsil.sondelali.com/demo](https://narsil.sondelali.com/demo). Read the full documentation at [narsil.sondelali.com/docs](https://narsil.sondelali.com/docs).
|
|
@@ -19238,7 +19238,7 @@ var storageCode = codeLoader(async () => {
|
|
|
19238
19238
|
loadSegmentMerge(),
|
|
19239
19239
|
loadSuggestionStore(),
|
|
19240
19240
|
loadVectorCore(),
|
|
19241
|
-
import('./storage-leaf-
|
|
19241
|
+
import('./storage-leaf-72PEG6IP.mjs')
|
|
19242
19242
|
]);
|
|
19243
19243
|
code7.bindStorageHost(optionalCodeHost(), digest2, msgpack, segmentCodec2, segmentMerge2, suggestionStore2, vectorCore2);
|
|
19244
19244
|
return code7;
|
|
@@ -8511,12 +8511,15 @@ function markerSlotOffset(slotIndex) {
|
|
|
8511
8511
|
function isRecord6(value) {
|
|
8512
8512
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
8513
8513
|
}
|
|
8514
|
+
function invalidReplicationPayload(message) {
|
|
8515
|
+
return new NarsilError(ErrorCodes.REPLICATION_ENTRY_INVALID, message);
|
|
8516
|
+
}
|
|
8514
8517
|
function optionalIndexUuid(value, payloadName) {
|
|
8515
8518
|
if (value === void 0 || value === null) {
|
|
8516
8519
|
return void 0;
|
|
8517
8520
|
}
|
|
8518
8521
|
if (typeof value !== "string" || value.length === 0) {
|
|
8519
|
-
throw
|
|
8522
|
+
throw invalidReplicationPayload(`Invalid ${payloadName}: "indexUuid" must be a non-empty string or absent`);
|
|
8520
8523
|
}
|
|
8521
8524
|
return value;
|
|
8522
8525
|
}
|
|
@@ -8525,41 +8528,46 @@ function optionalPreviousPrimaryTerm(value, payloadName) {
|
|
|
8525
8528
|
return void 0;
|
|
8526
8529
|
}
|
|
8527
8530
|
if (typeof value !== "number" || !Number.isInteger(value) || value < 0) {
|
|
8528
|
-
throw
|
|
8531
|
+
throw invalidReplicationPayload(
|
|
8532
|
+
`Invalid ${payloadName}: "previousPrimaryTerm" must be a non-negative integer or absent`
|
|
8533
|
+
);
|
|
8529
8534
|
}
|
|
8530
8535
|
return value;
|
|
8531
8536
|
}
|
|
8532
8537
|
function validateEntryPayload(decoded) {
|
|
8533
8538
|
if (!isRecord6(decoded) || !isRecord6(decoded.entry)) {
|
|
8534
|
-
throw
|
|
8539
|
+
throw invalidReplicationPayload('Invalid EntryPayload: missing or invalid "entry" field');
|
|
8535
8540
|
}
|
|
8536
8541
|
const entry = decoded.entry;
|
|
8537
8542
|
if (typeof entry.seqNo !== "number") {
|
|
8538
|
-
throw
|
|
8543
|
+
throw invalidReplicationPayload('Invalid EntryPayload: "entry.seqNo" must be a number');
|
|
8539
8544
|
}
|
|
8540
8545
|
if (typeof entry.primaryTerm !== "number") {
|
|
8541
|
-
throw
|
|
8546
|
+
throw invalidReplicationPayload('Invalid EntryPayload: "entry.primaryTerm" must be a number');
|
|
8542
8547
|
}
|
|
8543
8548
|
if (entry.operation !== "INDEX" && entry.operation !== "DELETE") {
|
|
8544
|
-
throw
|
|
8549
|
+
throw invalidReplicationPayload('Invalid EntryPayload: "entry.operation" must be "INDEX" or "DELETE"');
|
|
8545
8550
|
}
|
|
8546
8551
|
if (typeof entry.partitionId !== "number") {
|
|
8547
|
-
throw
|
|
8552
|
+
throw invalidReplicationPayload('Invalid EntryPayload: "entry.partitionId" must be a number');
|
|
8548
8553
|
}
|
|
8549
8554
|
if (typeof entry.indexName !== "string") {
|
|
8550
|
-
throw
|
|
8555
|
+
throw invalidReplicationPayload('Invalid EntryPayload: "entry.indexName" must be a string');
|
|
8551
8556
|
}
|
|
8552
8557
|
if (typeof entry.documentId !== "string") {
|
|
8553
|
-
throw
|
|
8558
|
+
throw invalidReplicationPayload('Invalid EntryPayload: "entry.documentId" must be a string');
|
|
8554
8559
|
}
|
|
8560
|
+
entry.document ??= null;
|
|
8555
8561
|
if (entry.document !== null && !(entry.document instanceof Uint8Array)) {
|
|
8556
|
-
throw
|
|
8562
|
+
throw invalidReplicationPayload('Invalid EntryPayload: "entry.document" must be binary or absent');
|
|
8557
8563
|
}
|
|
8558
8564
|
if ("previousDocument" in entry && entry.previousDocument !== null && !(entry.previousDocument instanceof Uint8Array)) {
|
|
8559
|
-
throw
|
|
8565
|
+
throw invalidReplicationPayload(
|
|
8566
|
+
'Invalid EntryPayload: "entry.previousDocument" must be Uint8Array or null where present'
|
|
8567
|
+
);
|
|
8560
8568
|
}
|
|
8561
8569
|
if (typeof entry.checksum !== "number") {
|
|
8562
|
-
throw
|
|
8570
|
+
throw invalidReplicationPayload('Invalid EntryPayload: "entry.checksum" must be a number');
|
|
8563
8571
|
}
|
|
8564
8572
|
optionalIndexUuid(decoded.indexUuid, "EntryPayload");
|
|
8565
8573
|
optionalPreviousPrimaryTerm(decoded.previousPrimaryTerm, "EntryPayload");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { isValidInteger, isRecord } from './chunk-
|
|
1
|
+
import { isValidInteger, isRecord } from './chunk-CZHAPGVH.mjs';
|
|
2
2
|
import { MAX_REPLICATION_FACTOR, MAX_PARTITION_COUNT } from './chunk-JDDXV6UF.mjs';
|
|
3
|
-
import { openChecksummedEnvelope, packChecksummedEnvelope, MAX_HISTORY_FILE_BYTES } from './chunk-
|
|
3
|
+
import { openChecksummedEnvelope, packChecksummedEnvelope, MAX_HISTORY_FILE_BYTES } from './chunk-GTB2S2VX.mjs';
|
|
4
4
|
import { decode } from './chunk-Y7GXGJFZ.mjs';
|
|
5
5
|
import { isSyncEpoch } from './chunk-BUMREPLU.mjs';
|
|
6
6
|
import { joinChunks } from './chunk-GR5GMFJJ.mjs';
|
|
@@ -169,14 +169,14 @@ function isSafeFileKey(key) {
|
|
|
169
169
|
return typeof key === "string" && key.length <= MAX_BACKUP_FILE_PATH_LENGTH && key.split("/").every((segment) => PATH_SEGMENT_PATTERN.test(segment));
|
|
170
170
|
}
|
|
171
171
|
function readAllocationConstraints(value) {
|
|
172
|
-
if (!isRecord(value)
|
|
172
|
+
if (!isRecord(value)) return null;
|
|
173
|
+
const zoneAwareness = value.zoneAwareness ?? false;
|
|
174
|
+
const zoneAttribute = value.zoneAttribute ?? "zone";
|
|
175
|
+
const maxShardsPerNode = value.maxShardsPerNode ?? null;
|
|
176
|
+
if (typeof zoneAwareness !== "boolean" || typeof zoneAttribute !== "string" || zoneAttribute.length === 0 || !(maxShardsPerNode === null || isValidInteger(maxShardsPerNode) && maxShardsPerNode > 0)) {
|
|
173
177
|
return null;
|
|
174
178
|
}
|
|
175
|
-
return {
|
|
176
|
-
zoneAwareness: value.zoneAwareness,
|
|
177
|
-
zoneAttribute: value.zoneAttribute,
|
|
178
|
-
maxShardsPerNode: value.maxShardsPerNode
|
|
179
|
-
};
|
|
179
|
+
return { zoneAwareness, zoneAttribute, maxShardsPerNode };
|
|
180
180
|
}
|
|
181
181
|
function readStoredFile(value, backupName) {
|
|
182
182
|
if (!isRecord(value) || !isSha256Hex(value.sha256) || !isCount(value.bytes) || value.bytes > MAX_FILE_BYTES) {
|
|
@@ -205,7 +205,7 @@ function readBackupPartition(value, backupName, partitionCount) {
|
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
207
|
function validateManifest(raw, backupName) {
|
|
208
|
-
if (!isRecord(raw) || raw.name !== backupName || typeof raw.clusterUuid !== "string" || typeof raw.indexName !== "string" || !isCount(raw.startedAt) || !isCount(raw.completedAt) || !isValidInteger(raw.partitionCount) || raw.partitionCount < 1 || raw.partitionCount > MAX_PARTITION_COUNT || !isCount(raw.replicationFactor) || raw.replicationFactor > MAX_REPLICATION_FACTOR || !Array.isArray(raw.partitions) || raw.partitions.length !== raw.partitionCount || raw.syncEpoch !== void 0 && !isSyncEpoch(raw.syncEpoch) || !(raw.takenBy === void 0 || typeof raw.takenBy === "string")) {
|
|
208
|
+
if (!isRecord(raw) || raw.name !== backupName || typeof raw.clusterUuid !== "string" || typeof raw.indexName !== "string" || !isCount(raw.startedAt) || !isCount(raw.completedAt) || !isValidInteger(raw.partitionCount) || raw.partitionCount < 1 || raw.partitionCount > MAX_PARTITION_COUNT || !isCount(raw.replicationFactor) || raw.replicationFactor > MAX_REPLICATION_FACTOR || !Array.isArray(raw.partitions) || raw.partitions.length !== raw.partitionCount || raw.syncEpoch !== void 0 && raw.syncEpoch !== null && !isSyncEpoch(raw.syncEpoch) || !(raw.takenBy === void 0 || raw.takenBy === null || typeof raw.takenBy === "string")) {
|
|
209
209
|
throw damaged(backupName, "holds a malformed header");
|
|
210
210
|
}
|
|
211
211
|
const constraints = readAllocationConstraints(raw.constraints);
|
|
@@ -232,7 +232,7 @@ function validateManifest(raw, backupName) {
|
|
|
232
232
|
};
|
|
233
233
|
}
|
|
234
234
|
function readQueryHistory(value, backupName) {
|
|
235
|
-
if (value === void 0) return {};
|
|
235
|
+
if (value === void 0 || value === null) return {};
|
|
236
236
|
if (!Array.isArray(value) || value.length > MAX_BACKUP_HISTORY_FILES) {
|
|
237
237
|
throw damaged(backupName, "holds a malformed query history list");
|
|
238
238
|
}
|
|
@@ -279,7 +279,7 @@ function readRestorePlacement(request) {
|
|
|
279
279
|
if (constraints !== void 0 && constraints !== null) {
|
|
280
280
|
const read = readAllocationConstraints(constraints);
|
|
281
281
|
if (read === null) {
|
|
282
|
-
return '"constraints" must hold "zoneAwareness" as a boolean, "zoneAttribute" as a non-empty string, and "maxShardsPerNode" as a positive integer or
|
|
282
|
+
return '"constraints" must hold "zoneAwareness" as a boolean, "zoneAttribute" as a non-empty string, and "maxShardsPerNode" as a positive integer, or leave any of them out';
|
|
283
283
|
}
|
|
284
284
|
placement.constraints = read;
|
|
285
285
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createNumericIndex, createBooleanIndex, createEnumIndex, createLoadedGeoIndex, rebuildSizeIndexes, requirePatternSearch, patternIndexOf } from './chunk-
|
|
1
|
+
import { createNumericIndex, createBooleanIndex, createEnumIndex, createLoadedGeoIndex, rebuildSizeIndexes, requirePatternSearch, patternIndexOf } from './chunk-NNRDQYBD.mjs';
|
|
2
2
|
import { getFlatSchema, schemaFieldsOf, getNestedValue } from './chunk-EY5U4P5V.mjs';
|
|
3
3
|
|
|
4
4
|
// src/core/partition/pattern-snapshot.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { executeUntilAnswered } from './chunk-4H4RG2FR.mjs';
|
|
2
|
-
import { isCompositePartition, encodeSegmentState, freezeSegmentShared } from './chunk-
|
|
2
|
+
import { isCompositePartition, encodeSegmentState, freezeSegmentShared } from './chunk-NNRDQYBD.mjs';
|
|
3
3
|
import { NarsilError, ErrorCodes } from './chunk-ZKOQR7EA.mjs';
|
|
4
4
|
|
|
5
5
|
// src/core/partition/frozen/share.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { encode } from './chunk-S5QMWECL.mjs';
|
|
2
2
|
import { oneSyncChangeAtATime } from './chunk-V6EUBAIT.mjs';
|
|
3
|
-
import { openChecksummedEnvelope, packChecksummedEnvelope } from './chunk-
|
|
4
|
-
import { rulesOfStoredSynonyms, configurationPayloadOf, withOpenIndex, emitSyncChange, validQueryFilter, createPartitionIndex, prepareDocumentVectors, createPatternWorkMeter, resolvePartitionInsertOptions } from './chunk-
|
|
3
|
+
import { openChecksummedEnvelope, packChecksummedEnvelope } from './chunk-GTB2S2VX.mjs';
|
|
4
|
+
import { rulesOfStoredSynonyms, configurationPayloadOf, withOpenIndex, emitSyncChange, validQueryFilter, createPartitionIndex, prepareDocumentVectors, createPatternWorkMeter, resolvePartitionInsertOptions } from './chunk-NNRDQYBD.mjs';
|
|
5
5
|
import { decode } from './chunk-Y7GXGJFZ.mjs';
|
|
6
6
|
import { newSyncEpoch, isSyncEpoch } from './chunk-BUMREPLU.mjs';
|
|
7
7
|
import { NarsilError, ErrorCodes } from './chunk-ZKOQR7EA.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { loadStorageCode, resolvePartialWordAnalysis, resolvePartitionInsertOptions, yieldToEventLoop, createPartitionIndex, writePartitionDocument } from './chunk-
|
|
1
|
+
import { loadStorageCode, resolvePartialWordAnalysis, resolvePartitionInsertOptions, yieldToEventLoop, createPartitionIndex, writePartitionDocument } from './chunk-NNRDQYBD.mjs';
|
|
2
2
|
|
|
3
3
|
// src/partitioning/constants.ts
|
|
4
4
|
var REBALANCE_CHUNK_SIZE = 1e3;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { loadVectorField, openColdVectorField, VECTOR_FILE_ENVELOPE_VERSION, GRAPH_PART_ENVELOPE_VERSION } from './chunk-
|
|
2
|
-
import { engineChangeSource, ChangeCursor, createSemaphore, changePositionList, changesNotEnabled, previousDocumentRequired, invalidPositions, changePositionsOf, requireConfigurationShape, RESTORE_ESTIMATE_MARGIN, persistEpochStates, RESTORE_WORST_EXTERNAL_BYTES_PER_VECTOR_DIMENSION, RESTORE_WORST_EXTERNAL_BYTES_PER_VECTOR, RESTORE_WORST_EXTERNAL_BYTES_PER_STORED_BYTE, RESTORE_WORST_HEAP_BYTES_PER_VECTOR_DIMENSION, RESTORE_WORST_HEAP_BYTES_PER_VECTOR, RESTORE_WORST_HEAP_BYTES_PER_STORED_BYTE, RESTORE_FLOOR_EXTERNAL_BYTES_PER_VECTOR_DIMENSION, RESTORE_FLOOR_EXTERNAL_BYTES_PER_VECTOR, RESTORE_FLOOR_EXTERNAL_BYTES_PER_STORED_BYTE, RESTORE_FLOOR_HEAP_BYTES_PER_VECTOR_DIMENSION, RESTORE_FLOOR_HEAP_BYTES_PER_VECTOR, RESTORE_FLOOR_HEAP_BYTES_PER_STORED_BYTE, RESTORE_WORST_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_VECTOR_DIMENSION, RESTORE_WORST_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_VECTOR, RESTORE_WORST_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_BYTE, RESTORE_WORST_HEAP_BYTES_PER_EARLIER_SNAPSHOT_VECTOR_DIMENSION, RESTORE_WORST_HEAP_BYTES_PER_EARLIER_SNAPSHOT_VECTOR, RESTORE_WORST_HEAP_BYTES_PER_EARLIER_SNAPSHOT_BYTE, RESTORE_FLOOR_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_VECTOR_DIMENSION, RESTORE_FLOOR_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_VECTOR, RESTORE_FLOOR_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_BYTE, RESTORE_FLOOR_HEAP_BYTES_PER_EARLIER_SNAPSHOT_VECTOR_DIMENSION, RESTORE_FLOOR_HEAP_BYTES_PER_EARLIER_SNAPSHOT_VECTOR, RESTORE_FLOOR_HEAP_BYTES_PER_EARLIER_SNAPSHOT_BYTE } from './chunk-
|
|
1
|
+
import { loadVectorField, openColdVectorField, VECTOR_FILE_ENVELOPE_VERSION, GRAPH_PART_ENVELOPE_VERSION } from './chunk-VIHHCXBO.mjs';
|
|
2
|
+
import { engineChangeSource, ChangeCursor, createSemaphore, changePositionList, changesNotEnabled, previousDocumentRequired, invalidPositions, changePositionsOf, requireConfigurationShape, RESTORE_ESTIMATE_MARGIN, persistEpochStates, RESTORE_WORST_EXTERNAL_BYTES_PER_VECTOR_DIMENSION, RESTORE_WORST_EXTERNAL_BYTES_PER_VECTOR, RESTORE_WORST_EXTERNAL_BYTES_PER_STORED_BYTE, RESTORE_WORST_HEAP_BYTES_PER_VECTOR_DIMENSION, RESTORE_WORST_HEAP_BYTES_PER_VECTOR, RESTORE_WORST_HEAP_BYTES_PER_STORED_BYTE, RESTORE_FLOOR_EXTERNAL_BYTES_PER_VECTOR_DIMENSION, RESTORE_FLOOR_EXTERNAL_BYTES_PER_VECTOR, RESTORE_FLOOR_EXTERNAL_BYTES_PER_STORED_BYTE, RESTORE_FLOOR_HEAP_BYTES_PER_VECTOR_DIMENSION, RESTORE_FLOOR_HEAP_BYTES_PER_VECTOR, RESTORE_FLOOR_HEAP_BYTES_PER_STORED_BYTE, RESTORE_WORST_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_VECTOR_DIMENSION, RESTORE_WORST_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_VECTOR, RESTORE_WORST_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_BYTE, RESTORE_WORST_HEAP_BYTES_PER_EARLIER_SNAPSHOT_VECTOR_DIMENSION, RESTORE_WORST_HEAP_BYTES_PER_EARLIER_SNAPSHOT_VECTOR, RESTORE_WORST_HEAP_BYTES_PER_EARLIER_SNAPSHOT_BYTE, RESTORE_FLOOR_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_VECTOR_DIMENSION, RESTORE_FLOOR_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_VECTOR, RESTORE_FLOOR_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_BYTE, RESTORE_FLOOR_HEAP_BYTES_PER_EARLIER_SNAPSHOT_VECTOR_DIMENSION, RESTORE_FLOOR_HEAP_BYTES_PER_EARLIER_SNAPSHOT_VECTOR, RESTORE_FLOOR_HEAP_BYTES_PER_EARLIER_SNAPSHOT_BYTE } from './chunk-AQI4DIFA.mjs';
|
|
3
3
|
import { restoredConfigFields, restoredEmbedding } from './chunk-M2Z5WVWW.mjs';
|
|
4
|
-
import { ENTRIES_MESSAGE_LIMIT_BYTES, FEED_HEAD_RETRY_MS, decodeSegmentManifest, isRecord, isUint32, isSequenceNumber, ARCHIVE_CONFIG_ENTRY, ARCHIVE_MANIFEST_ENTRY, tarEnd, tarEntryHeaders, tarPadding, ARCHIVE_FILE_CHUNK_BYTES } from './chunk-
|
|
5
|
-
import { isPagedSegmentFile, openPagedSegmentScan, countsAsLatestHolder, writeCheckpointSegments, commitCheckpointManifest, readSegmentFile, readCommitMarker, nextMarkerSlot, encodeMarkerSlot, markerSlotOffset, removeUnusedSegmentFiles, readWalSegments, durableRecordMissing, checkpointLastSeqNo, pagedListingOf, residentSectionsOf, filePathOf, partitionContentsOf, checkPagedSegmentFully, openPagedSnapshot, createPagedFrozenSegment, SEGMENT_HEADER_SIZE, KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment } from './chunk-
|
|
6
|
-
import { decodeSections, READS_AHEAD_AT_ONCE, readFileRangeLater, SEGMENT_PAGE_BYTES, RECORD_PAGE_BYTES, READ_AHEAD_CHUNK_BYTES, STABLE_HEAD_ATTEMPTS, directoryCheckpointStore } from './chunk-
|
|
7
|
-
import { manifestKey, segmentsPrefix, vectorFileKey, manifestFileRefs, graphPartKey } from './chunk-
|
|
4
|
+
import { ENTRIES_MESSAGE_LIMIT_BYTES, FEED_HEAD_RETRY_MS, decodeSegmentManifest, isRecord, isUint32, isSequenceNumber, ARCHIVE_CONFIG_ENTRY, ARCHIVE_MANIFEST_ENTRY, tarEnd, tarEntryHeaders, tarPadding, ARCHIVE_FILE_CHUNK_BYTES } from './chunk-RBHEMWN6.mjs';
|
|
5
|
+
import { isPagedSegmentFile, openPagedSegmentScan, countsAsLatestHolder, writeCheckpointSegments, commitCheckpointManifest, readSegmentFile, readCommitMarker, nextMarkerSlot, encodeMarkerSlot, markerSlotOffset, removeUnusedSegmentFiles, readWalSegments, durableRecordMissing, checkpointLastSeqNo, pagedListingOf, residentSectionsOf, filePathOf, partitionContentsOf, checkPagedSegmentFully, openPagedSnapshot, createPagedFrozenSegment, SEGMENT_HEADER_SIZE, KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment } from './chunk-HWIIMLLR.mjs';
|
|
6
|
+
import { decodeSections, READS_AHEAD_AT_ONCE, readFileRangeLater, SEGMENT_PAGE_BYTES, RECORD_PAGE_BYTES, READ_AHEAD_CHUNK_BYTES, STABLE_HEAD_ATTEMPTS, directoryCheckpointStore } from './chunk-JASE2FE6.mjs';
|
|
7
|
+
import { manifestKey, segmentsPrefix, vectorFileKey, manifestFileRefs, graphPartKey } from './chunk-EDZJNZKV.mjs';
|
|
8
8
|
import { encode } from './chunk-S5QMWECL.mjs';
|
|
9
9
|
import { setNestedValue, restoreVectorFields } from './chunk-5SHWA6PE.mjs';
|
|
10
|
-
import { DEFAULT_WRITE_AHEAD_QUEUE_MAX_SIZE, rewriteSpillOf, REBALANCE_CHUNK_SIZE, rebuildTextIndexes, textRebuildTargetOf } from './chunk-
|
|
10
|
+
import { DEFAULT_WRITE_AHEAD_QUEUE_MAX_SIZE, rewriteSpillOf, REBALANCE_CHUNK_SIZE, rebuildTextIndexes, textRebuildTargetOf } from './chunk-AWMO3NKJ.mjs';
|
|
11
11
|
import { DEFAULT_VECTOR_METRIC, defaultQuantizationFor, vectorsPerFile, vectorsToBytes, VECTOR_FILE_PAYLOAD_VERSION, decodeVectorFilePayload, isDead, bytesToVectors } from './chunk-R724DJSG.mjs';
|
|
12
12
|
import { oneSyncChangeAtATime } from './chunk-V6EUBAIT.mjs';
|
|
13
|
-
import { openChecksummedEnvelope, HEADER_SIZE, packChecksummedEnvelope, packEnvelopeWithChecksum, checksumOfChunks, readHeader, crc32, engineVersionParts, writeHeader, storedStateToWire, storedStateFromWire } from './chunk-
|
|
14
|
-
import { resolveIndexAnalysis, getLanguage, emitEngineEvent, reconstructSchemaFromMetadata, prepareStoredSynonyms, rulesOfStoredSynonyms, resolvePartialWordAnalysis, oversizedConfigurationPayloadOf, requireEncodedConfigurationWithinSizeLimit, loadSchemaCodeFor, VERSION, DEFAULT_BM25_B, DEFAULT_BM25_K1, decodeEveryStoredDocument, createSharedFrozenSegment, shareSegmentArrays, removeDocumentVectors, prepareDocumentVectors, insertDocumentVectors, noteDocumentChurn, createPartitionIndex, writePartitionDocument, yieldToEventLoop, createPublicationGate, removedSurfaceSpellings, readHeapStatistics, readProcessMemoryUse, prepareConfiguredSynonyms, withOpenIndex, loadGzip, prepareRemovalText, prepareDocumentText, updateDocumentVectors, holdSyncEpochChange, decodeStoredDocument, emitSyncChange, ARRAY_POSITION_GAP } from './chunk-
|
|
13
|
+
import { openChecksummedEnvelope, HEADER_SIZE, packChecksummedEnvelope, packEnvelopeWithChecksum, checksumOfChunks, readHeader, crc32, engineVersionParts, writeHeader, storedStateToWire, storedStateFromWire } from './chunk-GTB2S2VX.mjs';
|
|
14
|
+
import { resolveIndexAnalysis, getLanguage, emitEngineEvent, reconstructSchemaFromMetadata, prepareStoredSynonyms, rulesOfStoredSynonyms, resolvePartialWordAnalysis, oversizedConfigurationPayloadOf, requireEncodedConfigurationWithinSizeLimit, loadSchemaCodeFor, VERSION, DEFAULT_BM25_B, DEFAULT_BM25_K1, decodeEveryStoredDocument, createSharedFrozenSegment, shareSegmentArrays, removeDocumentVectors, prepareDocumentVectors, insertDocumentVectors, noteDocumentChurn, createPartitionIndex, writePartitionDocument, yieldToEventLoop, createPublicationGate, removedSurfaceSpellings, readHeapStatistics, readProcessMemoryUse, prepareConfiguredSynonyms, withOpenIndex, loadGzip, prepareRemovalText, prepareDocumentText, updateDocumentVectors, holdSyncEpochChange, decodeStoredDocument, emitSyncChange, ARRAY_POSITION_GAP } from './chunk-NNRDQYBD.mjs';
|
|
15
15
|
import { decode } from './chunk-Y7GXGJFZ.mjs';
|
|
16
16
|
import { isSyncEpoch, newSyncEpoch } from './chunk-BUMREPLU.mjs';
|
|
17
17
|
import { extractVectorFieldsFromSchema, flattenSchema, VECTOR_PATTERN, validateDocument, validateDocumentStrict, schemaFieldsOf, parseVectorDimension, requireValidFieldTypes, isQuantizationMode, isStorageMode, MAX_DOCUMENT_NESTING_DEPTH } from './chunk-EY5U4P5V.mjs';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { syncStorageOf, INDEX_CONFIGURATION_ENVELOPE_VERSION, MAX_SNAPSHOT_ANALYSIS_ATTEMPTS, encodeIndexConfiguration } from './chunk-
|
|
2
|
-
import { archiveLayout } from './chunk-
|
|
3
|
-
import { manifestFileRefs } from './chunk-
|
|
1
|
+
import { syncStorageOf, INDEX_CONFIGURATION_ENVELOPE_VERSION, MAX_SNAPSHOT_ANALYSIS_ATTEMPTS, encodeIndexConfiguration } from './chunk-AQI4DIFA.mjs';
|
|
2
|
+
import { archiveLayout } from './chunk-RBHEMWN6.mjs';
|
|
3
|
+
import { manifestFileRefs } from './chunk-EDZJNZKV.mjs';
|
|
4
4
|
import { oneSyncChangeAtATime } from './chunk-V6EUBAIT.mjs';
|
|
5
|
-
import { openChecksummedEnvelope } from './chunk-
|
|
6
|
-
import { withOpenIndex, emitEngineEvent } from './chunk-
|
|
5
|
+
import { openChecksummedEnvelope } from './chunk-GTB2S2VX.mjs';
|
|
6
|
+
import { withOpenIndex, emitEngineEvent } from './chunk-NNRDQYBD.mjs';
|
|
7
7
|
import { decode } from './chunk-Y7GXGJFZ.mjs';
|
|
8
8
|
import { isSyncEpoch } from './chunk-BUMREPLU.mjs';
|
|
9
9
|
import { DIRECTORY_IDENTITY_CHECK_INTERVAL_MS } from './chunk-S3JHYPH7.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { restoredEmbedding, restoredPartitionConfig, readSharedConfigFields } from './chunk-M2Z5WVWW.mjs';
|
|
2
2
|
import { MAX_PARTITION_COUNT, MAX_REPLICATION_FACTOR } from './chunk-JDDXV6UF.mjs';
|
|
3
|
-
import { storedStateOf } from './chunk-
|
|
4
|
-
import { getLanguage, generateId, decodeSynonymRules } from './chunk-
|
|
3
|
+
import { storedStateOf } from './chunk-GTB2S2VX.mjs';
|
|
4
|
+
import { getLanguage, generateId, decodeSynonymRules } from './chunk-NNRDQYBD.mjs';
|
|
5
5
|
import { decode } from './chunk-Y7GXGJFZ.mjs';
|
|
6
6
|
import { isSyncEpoch } from './chunk-BUMREPLU.mjs';
|
|
7
7
|
import { MAX_INDEX_NAME_LENGTH, INDEX_NAME_PATTERN } from './chunk-3ECIRFS5.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { withOpenIndex, oneAtATime, validateBM25Params, storedBM25Params, emitSyncChange } from './chunk-
|
|
1
|
+
import { withOpenIndex, oneAtATime, validateBM25Params, storedBM25Params, emitSyncChange } from './chunk-NNRDQYBD.mjs';
|
|
2
2
|
import { ErrorCodes } from './chunk-ZKOQR7EA.mjs';
|
|
3
3
|
|
|
4
4
|
// src/engine/bm25-update.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { encode, Merger } from './chunk-
|
|
2
|
-
import { DayStore, RestoredHistory, dayOf, sameBytes } from './chunk-
|
|
1
|
+
import { encode, Merger } from './chunk-WRDGPEN6.mjs';
|
|
2
|
+
import { DayStore, RestoredHistory, dayOf, sameBytes } from './chunk-WCGFMFWK.mjs';
|
|
3
3
|
import { oneSyncChangeAtATime } from './chunk-V6EUBAIT.mjs';
|
|
4
|
-
import { isGroup, invalidSetting, historyFilesOf, buildRecordKey, MIN_KEY_BYTES, resolveSetting, isPerson, acceptedPhrase, removeHistoryFolder, normaliseBan, banListFromInput, validateSetting, withState, packEnvelopeWithChecksum, crc32, openChecksummedEnvelope, SCRAMBLED_ID_BYTES, KEY_FINGERPRINT_LABEL, KEY_FINGERPRINT_BYTES, removeRestoreLeftovers, HISTORY_SWEEP_INTERVAL_MS, SCHEDULE_OFF, parseSchedule, nextMatchAfter, latestMatchAtOrBefore, DAY_MS, listHistoryFolder, historyFileOf, MAX_MANUAL_SUGGESTION_COUNT, MAX_SOURCE_INDEX_NAME_LENGTH, DEFAULT_PREVIEW_LIMIT, MAX_PREVIEW_LIMIT, requireFieldsInSchema, MAX_TIMER_DELAY_MS, BUILD_WRITE_BATCH, BYTES_PER_MIB, MS_PER_SECOND, BUILD_LIST_PAGE, unionOfBans } from './chunk-
|
|
5
|
-
import { GROUP_FORMAT, emitEngineEvent, emitWriteEventAfter, createEngineIndex, withOpenIndex, loadDigest, SUGGESTIONS_INDEX_INFIX } from './chunk-
|
|
4
|
+
import { isGroup, invalidSetting, historyFilesOf, buildRecordKey, MIN_KEY_BYTES, resolveSetting, isPerson, acceptedPhrase, removeHistoryFolder, normaliseBan, banListFromInput, validateSetting, withState, packEnvelopeWithChecksum, crc32, openChecksummedEnvelope, SCRAMBLED_ID_BYTES, KEY_FINGERPRINT_LABEL, KEY_FINGERPRINT_BYTES, removeRestoreLeftovers, HISTORY_SWEEP_INTERVAL_MS, SCHEDULE_OFF, parseSchedule, nextMatchAfter, latestMatchAtOrBefore, DAY_MS, listHistoryFolder, historyFileOf, MAX_MANUAL_SUGGESTION_COUNT, MAX_SOURCE_INDEX_NAME_LENGTH, DEFAULT_PREVIEW_LIMIT, MAX_PREVIEW_LIMIT, requireFieldsInSchema, MAX_TIMER_DELAY_MS, BUILD_WRITE_BATCH, BYTES_PER_MIB, MS_PER_SECOND, BUILD_LIST_PAGE, unionOfBans } from './chunk-GTB2S2VX.mjs';
|
|
5
|
+
import { GROUP_FORMAT, emitEngineEvent, emitWriteEventAfter, createEngineIndex, withOpenIndex, loadDigest, SUGGESTIONS_INDEX_INFIX } from './chunk-NNRDQYBD.mjs';
|
|
6
6
|
import { decode } from './chunk-Y7GXGJFZ.mjs';
|
|
7
7
|
import { spawnNodeWorker, resolveWorkerEntry } from './chunk-PSZEGK6W.mjs';
|
|
8
8
|
import { NarsilError, ErrorCodes } from './chunk-ZKOQR7EA.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { boundQuerySuggestionsOf } from './chunk-S2POFTLN.mjs';
|
|
2
|
-
import { engineCoreOf, loadSuggestionsCode, GROUP_PATTERN_SOURCE, GROUP_FORMAT, SUGGESTIONS_INDEX_INFIX } from './chunk-
|
|
2
|
+
import { engineCoreOf, loadSuggestionsCode, GROUP_PATTERN_SOURCE, GROUP_FORMAT, SUGGESTIONS_INDEX_INFIX } from './chunk-NNRDQYBD.mjs';
|
|
3
3
|
import { NarsilError, ErrorCodes } from './chunk-ZKOQR7EA.mjs';
|
|
4
4
|
|
|
5
5
|
// src/query-suggestions/index.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VERSION, GROUP_PATTERN_SOURCE, loadGzip } from './chunk-
|
|
1
|
+
import { VERSION, GROUP_PATTERN_SOURCE, loadGzip } from './chunk-NNRDQYBD.mjs';
|
|
2
2
|
import { flattenSchema } from './chunk-EY5U4P5V.mjs';
|
|
3
3
|
import { NATIVE_CRC32_MIN_BYTES, MAX_FILE_BYTES, CHECKSUM_YIELD_CHUNK_BYTES } from './chunk-4PY4JYMY.mjs';
|
|
4
4
|
import { NarsilError, ErrorCodes } from './chunk-ZKOQR7EA.mjs';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { PAGED_SEGMENT_ENVELOPE_VERSION, loadFailed, checkEverySectionPage, openPagedFile, sectionNamed, createSectionReader, closePagedFile, readWholeSectionChecked, readCacheOfThisThread, createReadCache, MERGE_READ_CACHE_BYTES, encodePagedSegmentHead, SECTION_ALIGNMENT_BYTES, SEGMENT_PAGE_BYTES, FILE_ASSEMBLY_CHUNK_BYTES, readListedFile, requireListedChecksum, encodeSegmentManifest, requireNativePage, ID_SAMPLE_INTERVAL, SMALLEST_BLOCK_POSTINGS, readFileRange, PAYLOAD_PREFIX_BYTES, decodePagedSegmentHead, BLOCK_SUMMARY_BYTES, DOCUMENT_BLOCK_BYTES, MAX_DOCUMENT_BLOCK_RAW_BYTES, resumePagedFile, suspendPagedFile, cachedFileBytes, LIST_VIEWS_HELD_PER_SEGMENT, WRITER_YIELD_INTERVAL_TOKENS, DOCUMENT_BLOCK_MIN_RAW_BYTES, CACHED_POSITIONS, POSITION_WIDTH_BYTES, CACHED_LIST, POSTING_WIDTH_BYTES, readFileRangeLater, CACHED_DOCUMENT_BLOCK, failNativePage, REMOVAL_BUCKET_WRITE_BUFFER_BYTES, POSTING_WRITE_ROWS, POSTING_WRITE_POSITIONS, SECTION_WRITE_BUFFER_BYTES, LARGEST_REMOVAL_BUCKET_COUNT, REMOVAL_BUCKET_TARGET_BYTES, MERGED_SEGMENT_GROWTH_ALLOWANCE, MERGED_SEGMENT_TARGET_BYTES } from './chunk-
|
|
1
|
+
import { PAGED_SEGMENT_ENVELOPE_VERSION, loadFailed, checkEverySectionPage, openPagedFile, sectionNamed, createSectionReader, closePagedFile, readWholeSectionChecked, readCacheOfThisThread, createReadCache, MERGE_READ_CACHE_BYTES, encodePagedSegmentHead, SECTION_ALIGNMENT_BYTES, SEGMENT_PAGE_BYTES, FILE_ASSEMBLY_CHUNK_BYTES, readListedFile, requireListedChecksum, encodeSegmentManifest, requireNativePage, ID_SAMPLE_INTERVAL, SMALLEST_BLOCK_POSTINGS, readFileRange, PAYLOAD_PREFIX_BYTES, decodePagedSegmentHead, BLOCK_SUMMARY_BYTES, DOCUMENT_BLOCK_BYTES, MAX_DOCUMENT_BLOCK_RAW_BYTES, resumePagedFile, suspendPagedFile, cachedFileBytes, LIST_VIEWS_HELD_PER_SEGMENT, WRITER_YIELD_INTERVAL_TOKENS, DOCUMENT_BLOCK_MIN_RAW_BYTES, CACHED_POSITIONS, POSITION_WIDTH_BYTES, CACHED_LIST, POSTING_WIDTH_BYTES, readFileRangeLater, CACHED_DOCUMENT_BLOCK, failNativePage, REMOVAL_BUCKET_WRITE_BUFFER_BYTES, POSTING_WRITE_ROWS, POSTING_WRITE_POSITIONS, SECTION_WRITE_BUFFER_BYTES, LARGEST_REMOVAL_BUCKET_COUNT, REMOVAL_BUCKET_TARGET_BYTES, MERGED_SEGMENT_GROWTH_ALLOWANCE, MERGED_SEGMENT_TARGET_BYTES } from './chunk-JASE2FE6.mjs';
|
|
2
2
|
import { ReplicationMessageTypes } from './chunk-5FLRXF73.mjs';
|
|
3
3
|
import { WIRE_BATCH_BUDGET } from './chunk-JDDXV6UF.mjs';
|
|
4
|
-
import { SEGMENT_MANIFEST_VERSION, manifestKey, manifestReferencedKeys, segmentsPrefix, snapshotBundleKey, MAX_SEGMENTS_PER_PARTITION, segmentKey } from './chunk-
|
|
4
|
+
import { SEGMENT_MANIFEST_VERSION, manifestKey, manifestReferencedKeys, segmentsPrefix, snapshotBundleKey, MAX_SEGMENTS_PER_PARTITION, segmentKey } from './chunk-EDZJNZKV.mjs';
|
|
5
5
|
import { encode } from './chunk-S5QMWECL.mjs';
|
|
6
6
|
import { restoreVectorFields } from './chunk-5SHWA6PE.mjs';
|
|
7
|
-
import { requireWithinFileLimit, HEADER_SIZE, crc32Init, crc32Update, crc32Final, engineVersionParts, writeHeader, crc32, openChecksummedEnvelope, readHeader, packChecksummedEnvelope } from './chunk-
|
|
8
|
-
import { decodeStoredDocument, generateId, wrapFrozenTokenTable, createEncodedDocumentSource, assemblePagedFrozenSegment, buildPartialWordTableFrom, mergeFieldIndexes, isCompositePartition, reconstructSchemaFromMetadata, decodeSurfaceTable, mergeDocFrequencies, TermLookup, createFrozenRemovals, selectionKeeps, fieldIndexRemapOf, mergeKeywordSources, mergeSourceSpellings, mergeSourceSurfaces, mergedPartialSpellings, createSharedFrozenSegment, shareSegmentArrays, getLanguage, emptyPendingRegions, mergePostings2, scanPostingBlocks, holdsADiscardedField, SegmentRefusal, survivorDocumentsOf, partitionStateOf, freezeSegmentShared, createFrozenSegment, createPartitionManager, createPartitionRouter, buildSegmentPayloads, resolvePartitionInsertOptions, endOfValue, segmentArraysOf, mergeSegmentContents, decodeMapWithoutFields, prepareDocumentVectors, resolveIndexAnalysis } from './chunk-
|
|
7
|
+
import { requireWithinFileLimit, HEADER_SIZE, crc32Init, crc32Update, crc32Final, engineVersionParts, writeHeader, crc32, openChecksummedEnvelope, readHeader, packChecksummedEnvelope } from './chunk-GTB2S2VX.mjs';
|
|
8
|
+
import { decodeStoredDocument, generateId, wrapFrozenTokenTable, createEncodedDocumentSource, assemblePagedFrozenSegment, buildPartialWordTableFrom, mergeFieldIndexes, isCompositePartition, reconstructSchemaFromMetadata, decodeSurfaceTable, mergeDocFrequencies, TermLookup, createFrozenRemovals, selectionKeeps, fieldIndexRemapOf, mergeKeywordSources, mergeSourceSpellings, mergeSourceSurfaces, mergedPartialSpellings, createSharedFrozenSegment, shareSegmentArrays, getLanguage, emptyPendingRegions, mergePostings2, scanPostingBlocks, holdsADiscardedField, SegmentRefusal, survivorDocumentsOf, partitionStateOf, freezeSegmentShared, createFrozenSegment, createPartitionManager, createPartitionRouter, buildSegmentPayloads, resolvePartitionInsertOptions, endOfValue, segmentArraysOf, mergeSegmentContents, decodeMapWithoutFields, prepareDocumentVectors, resolveIndexAnalysis } from './chunk-NNRDQYBD.mjs';
|
|
9
9
|
import { encodeDocument } from './chunk-2CKDCC65.mjs';
|
|
10
10
|
import { decode } from './chunk-Y7GXGJFZ.mjs';
|
|
11
11
|
import { extractVectorFieldsFromSchema, VECTOR_PATTERN, requireValidFieldTypes, partialFieldsOf, messagePackUpperBoundBytes } from './chunk-EY5U4P5V.mjs';
|
|
@@ -3861,12 +3861,15 @@ function createInsyncConfirmMessage(payload, sourceId, requestId) {
|
|
|
3861
3861
|
function isRecord2(value) {
|
|
3862
3862
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
3863
3863
|
}
|
|
3864
|
+
function invalidReplicationPayload(message) {
|
|
3865
|
+
return new NarsilError(ErrorCodes.REPLICATION_ENTRY_INVALID, message);
|
|
3866
|
+
}
|
|
3864
3867
|
function optionalIndexUuid(value, payloadName) {
|
|
3865
3868
|
if (value === void 0 || value === null) {
|
|
3866
3869
|
return void 0;
|
|
3867
3870
|
}
|
|
3868
3871
|
if (typeof value !== "string" || value.length === 0) {
|
|
3869
|
-
throw
|
|
3872
|
+
throw invalidReplicationPayload(`Invalid ${payloadName}: "indexUuid" must be a non-empty string or absent`);
|
|
3870
3873
|
}
|
|
3871
3874
|
return value;
|
|
3872
3875
|
}
|
|
@@ -3875,10 +3878,34 @@ function optionalPreviousPrimaryTerm(value, payloadName) {
|
|
|
3875
3878
|
return void 0;
|
|
3876
3879
|
}
|
|
3877
3880
|
if (typeof value !== "number" || !Number.isInteger(value) || value < 0) {
|
|
3878
|
-
throw
|
|
3881
|
+
throw invalidReplicationPayload(
|
|
3882
|
+
`Invalid ${payloadName}: "previousPrimaryTerm" must be a non-negative integer or absent`
|
|
3883
|
+
);
|
|
3879
3884
|
}
|
|
3880
3885
|
return value;
|
|
3881
3886
|
}
|
|
3887
|
+
function validateForwardOperation(operation, label) {
|
|
3888
|
+
if (typeof operation.documentId !== "string" || operation.documentId.length === 0) {
|
|
3889
|
+
throw invalidReplicationPayload(`Invalid ${label}: "documentId" must be a non-empty string`);
|
|
3890
|
+
}
|
|
3891
|
+
if (operation.operation !== "insert" && operation.operation !== "remove" && operation.operation !== "update") {
|
|
3892
|
+
throw invalidReplicationPayload(`Invalid ${label}: "operation" must be "insert", "remove", or "update"`);
|
|
3893
|
+
}
|
|
3894
|
+
operation.document ??= null;
|
|
3895
|
+
operation.updateFields ??= null;
|
|
3896
|
+
if (operation.document !== null && !(operation.document instanceof Uint8Array)) {
|
|
3897
|
+
throw invalidReplicationPayload(`Invalid ${label}: "document" must be binary or absent`);
|
|
3898
|
+
}
|
|
3899
|
+
if (operation.updateFields !== null && !isPlainObject(operation.updateFields)) {
|
|
3900
|
+
throw invalidReplicationPayload(`Invalid ${label}: "updateFields" must be a map or absent`);
|
|
3901
|
+
}
|
|
3902
|
+
if (operation.operation === "insert" && operation.document === null) {
|
|
3903
|
+
throw invalidReplicationPayload(`Invalid ${label}: an insert requires a document`);
|
|
3904
|
+
}
|
|
3905
|
+
if (operation.operation === "update" && operation.document === null && operation.updateFields === null) {
|
|
3906
|
+
throw invalidReplicationPayload(`Invalid ${label}: an update requires a document or updateFields`);
|
|
3907
|
+
}
|
|
3908
|
+
}
|
|
3882
3909
|
function isPlainObject(value) {
|
|
3883
3910
|
if (!isRecord2(value)) {
|
|
3884
3911
|
return false;
|
|
@@ -3888,35 +3915,38 @@ function isPlainObject(value) {
|
|
|
3888
3915
|
}
|
|
3889
3916
|
function validateEntryPayload(decoded) {
|
|
3890
3917
|
if (!isRecord2(decoded) || !isRecord2(decoded.entry)) {
|
|
3891
|
-
throw
|
|
3918
|
+
throw invalidReplicationPayload('Invalid EntryPayload: missing or invalid "entry" field');
|
|
3892
3919
|
}
|
|
3893
3920
|
const entry = decoded.entry;
|
|
3894
3921
|
if (typeof entry.seqNo !== "number") {
|
|
3895
|
-
throw
|
|
3922
|
+
throw invalidReplicationPayload('Invalid EntryPayload: "entry.seqNo" must be a number');
|
|
3896
3923
|
}
|
|
3897
3924
|
if (typeof entry.primaryTerm !== "number") {
|
|
3898
|
-
throw
|
|
3925
|
+
throw invalidReplicationPayload('Invalid EntryPayload: "entry.primaryTerm" must be a number');
|
|
3899
3926
|
}
|
|
3900
3927
|
if (entry.operation !== "INDEX" && entry.operation !== "DELETE") {
|
|
3901
|
-
throw
|
|
3928
|
+
throw invalidReplicationPayload('Invalid EntryPayload: "entry.operation" must be "INDEX" or "DELETE"');
|
|
3902
3929
|
}
|
|
3903
3930
|
if (typeof entry.partitionId !== "number") {
|
|
3904
|
-
throw
|
|
3931
|
+
throw invalidReplicationPayload('Invalid EntryPayload: "entry.partitionId" must be a number');
|
|
3905
3932
|
}
|
|
3906
3933
|
if (typeof entry.indexName !== "string") {
|
|
3907
|
-
throw
|
|
3934
|
+
throw invalidReplicationPayload('Invalid EntryPayload: "entry.indexName" must be a string');
|
|
3908
3935
|
}
|
|
3909
3936
|
if (typeof entry.documentId !== "string") {
|
|
3910
|
-
throw
|
|
3937
|
+
throw invalidReplicationPayload('Invalid EntryPayload: "entry.documentId" must be a string');
|
|
3911
3938
|
}
|
|
3939
|
+
entry.document ??= null;
|
|
3912
3940
|
if (entry.document !== null && !(entry.document instanceof Uint8Array)) {
|
|
3913
|
-
throw
|
|
3941
|
+
throw invalidReplicationPayload('Invalid EntryPayload: "entry.document" must be binary or absent');
|
|
3914
3942
|
}
|
|
3915
3943
|
if ("previousDocument" in entry && entry.previousDocument !== null && !(entry.previousDocument instanceof Uint8Array)) {
|
|
3916
|
-
throw
|
|
3944
|
+
throw invalidReplicationPayload(
|
|
3945
|
+
'Invalid EntryPayload: "entry.previousDocument" must be Uint8Array or null where present'
|
|
3946
|
+
);
|
|
3917
3947
|
}
|
|
3918
3948
|
if (typeof entry.checksum !== "number") {
|
|
3919
|
-
throw
|
|
3949
|
+
throw invalidReplicationPayload('Invalid EntryPayload: "entry.checksum" must be a number');
|
|
3920
3950
|
}
|
|
3921
3951
|
optionalIndexUuid(decoded.indexUuid, "EntryPayload");
|
|
3922
3952
|
optionalPreviousPrimaryTerm(decoded.previousPrimaryTerm, "EntryPayload");
|
|
@@ -3924,23 +3954,25 @@ function validateEntryPayload(decoded) {
|
|
|
3924
3954
|
}
|
|
3925
3955
|
function validateEntryBatchPayload(decoded) {
|
|
3926
3956
|
if (!isRecord2(decoded) || !Array.isArray(decoded.entries)) {
|
|
3927
|
-
throw
|
|
3957
|
+
throw invalidReplicationPayload('Invalid EntryBatchPayload: missing or invalid "entries" field');
|
|
3928
3958
|
}
|
|
3929
3959
|
if (decoded.entries.length === 0) {
|
|
3930
|
-
throw
|
|
3960
|
+
throw invalidReplicationPayload('Invalid EntryBatchPayload: "entries" must not be empty');
|
|
3931
3961
|
}
|
|
3932
3962
|
const validated = decoded.entries.map((candidate) => validateEntryPayload({ entry: candidate }).entry);
|
|
3933
3963
|
const first = validated[0];
|
|
3934
3964
|
for (let index = 1; index < validated.length; index++) {
|
|
3935
3965
|
const entry = validated[index];
|
|
3936
3966
|
if (entry.indexName !== first.indexName || entry.partitionId !== first.partitionId) {
|
|
3937
|
-
throw
|
|
3967
|
+
throw invalidReplicationPayload("Invalid EntryBatchPayload: entries must belong to one partition of one index");
|
|
3938
3968
|
}
|
|
3939
3969
|
if (entry.primaryTerm !== first.primaryTerm) {
|
|
3940
|
-
throw
|
|
3970
|
+
throw invalidReplicationPayload("Invalid EntryBatchPayload: entries must share one primary term");
|
|
3941
3971
|
}
|
|
3942
3972
|
if (entry.seqNo !== validated[index - 1].seqNo + 1) {
|
|
3943
|
-
throw
|
|
3973
|
+
throw invalidReplicationPayload(
|
|
3974
|
+
"Invalid EntryBatchPayload: entries must carry contiguous ascending sequence numbers"
|
|
3975
|
+
);
|
|
3944
3976
|
}
|
|
3945
3977
|
}
|
|
3946
3978
|
const payload = { entries: validated };
|
|
@@ -3952,44 +3984,25 @@ function validateEntryBatchPayload(decoded) {
|
|
|
3952
3984
|
}
|
|
3953
3985
|
function validateForwardBatchPayload(decoded) {
|
|
3954
3986
|
if (!isRecord2(decoded)) {
|
|
3955
|
-
throw
|
|
3987
|
+
throw invalidReplicationPayload("Invalid ForwardBatchPayload: expected an object");
|
|
3956
3988
|
}
|
|
3957
3989
|
if (typeof decoded.indexName !== "string" || decoded.indexName.length === 0) {
|
|
3958
|
-
throw
|
|
3990
|
+
throw invalidReplicationPayload('Invalid ForwardBatchPayload: "indexName" must be a non-empty string');
|
|
3959
3991
|
}
|
|
3960
3992
|
if (!Array.isArray(decoded.operations)) {
|
|
3961
|
-
throw
|
|
3962
|
-
}
|
|
3963
|
-
if (decoded.operations.length === 0) {
|
|
3964
|
-
throw new Error('Invalid ForwardBatchPayload: "operations" must not be empty');
|
|
3993
|
+
throw invalidReplicationPayload('Invalid ForwardBatchPayload: "operations" must be an array');
|
|
3965
3994
|
}
|
|
3966
|
-
if (decoded.operations.length > MAX_FORWARD_BATCH_OPERATIONS) {
|
|
3967
|
-
throw
|
|
3968
|
-
`Invalid ForwardBatchPayload: "operations"
|
|
3995
|
+
if (decoded.operations.length === 0 || decoded.operations.length > MAX_FORWARD_BATCH_OPERATIONS) {
|
|
3996
|
+
throw invalidReplicationPayload(
|
|
3997
|
+
`Invalid ForwardBatchPayload: "operations" must hold from 1 to ${MAX_FORWARD_BATCH_OPERATIONS} operations`
|
|
3969
3998
|
);
|
|
3970
3999
|
}
|
|
3971
4000
|
for (let index = 0; index < decoded.operations.length; index++) {
|
|
3972
4001
|
const operation = decoded.operations[index];
|
|
3973
4002
|
if (!isRecord2(operation)) {
|
|
3974
|
-
throw
|
|
3975
|
-
}
|
|
3976
|
-
if (typeof operation.documentId !== "string" || operation.documentId.length === 0) {
|
|
3977
|
-
throw new Error(`Invalid ForwardBatchPayload: "operations[${index}].documentId" must be a non-empty string`);
|
|
3978
|
-
}
|
|
3979
|
-
if (operation.operation !== "insert" && operation.operation !== "remove" && operation.operation !== "update") {
|
|
3980
|
-
throw new Error(
|
|
3981
|
-
`Invalid ForwardBatchPayload: "operations[${index}].operation" must be "insert", "remove", or "update"`
|
|
3982
|
-
);
|
|
3983
|
-
}
|
|
3984
|
-
if (operation.document !== null && !(operation.document instanceof Uint8Array)) {
|
|
3985
|
-
throw new Error(`Invalid ForwardBatchPayload: "operations[${index}].document" must be Uint8Array or null`);
|
|
3986
|
-
}
|
|
3987
|
-
if (operation.operation === "insert" && operation.document === null) {
|
|
3988
|
-
throw new Error(`Invalid ForwardBatchPayload: "operations[${index}]" requires a document`);
|
|
3989
|
-
}
|
|
3990
|
-
if (operation.operation === "update" && operation.document === null && !isRecord2(operation.updateFields)) {
|
|
3991
|
-
throw new Error(`Invalid ForwardBatchPayload: "operations[${index}]" requires a document or updateFields`);
|
|
4003
|
+
throw invalidReplicationPayload(`Invalid ForwardBatchPayload: "operations[${index}]" must be an object`);
|
|
3992
4004
|
}
|
|
4005
|
+
validateForwardOperation(operation, `ForwardBatchPayload "operations[${index}]"`);
|
|
3993
4006
|
}
|
|
3994
4007
|
optionalIndexUuid(decoded.indexUuid, "ForwardBatchPayload");
|
|
3995
4008
|
return decoded;
|
|
@@ -4012,6 +4025,8 @@ function validateForwardBatchResultPayload(decoded) {
|
|
|
4012
4025
|
if (typeof result.success !== "boolean") {
|
|
4013
4026
|
throw new Error(`Invalid ForwardBatchResultPayload: "results[${index}].success" must be a boolean`);
|
|
4014
4027
|
}
|
|
4028
|
+
result.errorCode ??= null;
|
|
4029
|
+
result.errorMessage ??= null;
|
|
4015
4030
|
if (result.errorCode !== null && typeof result.errorCode !== "string") {
|
|
4016
4031
|
throw new Error(`Invalid ForwardBatchResultPayload: "results[${index}].errorCode" must be a string or null`);
|
|
4017
4032
|
}
|
|
@@ -5028,4 +5043,4 @@ async function removeCheckpointGarbage(store, garbage) {
|
|
|
5028
5043
|
}
|
|
5029
5044
|
}
|
|
5030
5045
|
|
|
5031
|
-
export { DEFAULT_LOG_RETENTION_BYTES, FRAME_CRC_SIZE, INSYNC_CAS_ATTEMPTS, KEYWORD_SEGMENT_ENVELOPE_VERSION, MAX_WAL_RECORD_BYTES, NOTHING_SAVED, RECORD_LENGTH_SIZE, SEGMENT_HEADER_SIZE, SEGMENT_TAIL_PATTERN, SNAPSHOT_CHUNK_SIZE, WAL_FORMAT_VERSION, WAL_FORMAT_VERSION_WITH_PREVIOUS_DOCUMENT, buildEntry, bytesThatSegmentsHoldInMemory, captureWholePartition, checkPagedContents, checkPagedSegmentFully, checkPagedSelections, checkSegmentHeader, checkpointGarbage, checkpointLastSeqNo, checkpointPrimaryTerm, commitCheckpointManifest, computeEntryChecksum, countsAsLatestHolder, createAckMessage, createEntryBatchMessage, createEntryMessage, createForwardBatchMessage, createForwardBatchResultMessage, createForwardMessage, createInsyncAddMessage, createInsyncConfirmMessage, createInsyncRemoveMessage, createPagedFrozenSegment, createPrimaryResignMessage, decodeKeywordSegment, decodeWalEntry, durableRecordMissing, encodeMarkerSlot, entryByteEstimate, filePathOf, frameRecord, isPagedSegmentFile, joinFrames, markerSlotOffset, mergePagedWindow, nextMarkerSlot, nextSegmentKey, openPagedSegmentScan, openPagedSnapshot, optionalIndexUuid, pagedListingOf, pagedTombstonesFor, parseSegmentStartSeqNo, partitionContentsOf, readCommitMarker, readSegmentFile, readWalSegments, removeCheckpointGarbage, removeUnusedSegmentFiles, residentSectionsOf, rewrittenHeaderKey, savedBytesOfManifest, segmentKey2 as segmentKey, validateAckPayload, validateEntryBatchPayload, validateEntryPayload, validateForwardBatchPayload, validateForwardBatchResultPayload, validateInsyncConfirmPayload, writeCheckpointSegments, writePagedSegment, writeSegmentHeader };
|
|
5046
|
+
export { DEFAULT_LOG_RETENTION_BYTES, FRAME_CRC_SIZE, INSYNC_CAS_ATTEMPTS, KEYWORD_SEGMENT_ENVELOPE_VERSION, MAX_WAL_RECORD_BYTES, NOTHING_SAVED, RECORD_LENGTH_SIZE, SEGMENT_HEADER_SIZE, SEGMENT_TAIL_PATTERN, SNAPSHOT_CHUNK_SIZE, WAL_FORMAT_VERSION, WAL_FORMAT_VERSION_WITH_PREVIOUS_DOCUMENT, buildEntry, bytesThatSegmentsHoldInMemory, captureWholePartition, checkPagedContents, checkPagedSegmentFully, checkPagedSelections, checkSegmentHeader, checkpointGarbage, checkpointLastSeqNo, checkpointPrimaryTerm, commitCheckpointManifest, computeEntryChecksum, countsAsLatestHolder, createAckMessage, createEntryBatchMessage, createEntryMessage, createForwardBatchMessage, createForwardBatchResultMessage, createForwardMessage, createInsyncAddMessage, createInsyncConfirmMessage, createInsyncRemoveMessage, createPagedFrozenSegment, createPrimaryResignMessage, decodeKeywordSegment, decodeWalEntry, durableRecordMissing, encodeMarkerSlot, entryByteEstimate, filePathOf, frameRecord, invalidReplicationPayload, isPagedSegmentFile, joinFrames, markerSlotOffset, mergePagedWindow, nextMarkerSlot, nextSegmentKey, openPagedSegmentScan, openPagedSnapshot, optionalIndexUuid, pagedListingOf, pagedTombstonesFor, parseSegmentStartSeqNo, partitionContentsOf, readCommitMarker, readSegmentFile, readWalSegments, removeCheckpointGarbage, removeUnusedSegmentFiles, residentSectionsOf, rewrittenHeaderKey, savedBytesOfManifest, segmentKey2 as segmentKey, validateAckPayload, validateEntryBatchPayload, validateEntryPayload, validateForwardBatchPayload, validateForwardBatchResultPayload, validateForwardOperation, validateInsyncConfirmPayload, writeCheckpointSegments, writePagedSegment, writeSegmentHeader };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SEGMENT_MANIFEST_VERSION, MANIFEST_ENVELOPE_VERSION } from './chunk-
|
|
1
|
+
import { SEGMENT_MANIFEST_VERSION, MANIFEST_ENVELOPE_VERSION } from './chunk-EDZJNZKV.mjs';
|
|
2
2
|
import { encode } from './chunk-S5QMWECL.mjs';
|
|
3
3
|
import { createFixedBuffer, createVectorFileReader } from './chunk-R724DJSG.mjs';
|
|
4
|
-
import { crc32, packChecksummedEnvelope, HEADER_SIZE } from './chunk-
|
|
4
|
+
import { crc32, packChecksummedEnvelope, HEADER_SIZE } from './chunk-GTB2S2VX.mjs';
|
|
5
5
|
import { decode } from './chunk-Y7GXGJFZ.mjs';
|
|
6
6
|
import { nativeSearchCoreIsEnabled, loadNativeCore } from './chunk-ASZLNVWW.mjs';
|
|
7
7
|
import { ErrorCodes, NarsilError } from './chunk-ZKOQR7EA.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bindResponseStop, toHttpError, sendError, RELAY_STREAM_CHUNKS_IN_FLIGHT } from './chunk-
|
|
1
|
+
import { bindResponseStop, toHttpError, sendError, RELAY_STREAM_CHUNKS_IN_FLIGHT } from './chunk-PM2UOKYB.mjs';
|
|
2
2
|
import { rm } from 'fs/promises';
|
|
3
3
|
import path from 'path';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { readRecentMemoryFigures, readMemoryFigures } from './chunk-
|
|
1
|
+
import { readRecentMemoryFigures, readMemoryFigures } from './chunk-NNRDQYBD.mjs';
|
|
2
2
|
import { collectGarbageBeforeAnswerRefusal, collectYoungGenerationBeforeRefusal, reservedHeapBytes, admitHeapBytes } from './chunk-BRTABNC7.mjs';
|
|
3
3
|
import { NarsilError, ErrorCodes, ServerErrorCodes } from './chunk-ZKOQR7EA.mjs';
|
|
4
4
|
|