@delali/narsil 0.3.1-next.151 → 0.3.1-next.152
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/{analysis-change-ZCJNYBJM.mjs → analysis-change-2OYM7ARW.mjs} +4 -4
- package/dist/{react-native/chunks/analysis-change-entry-BNRU6STO.mjs → analysis-change-entry-QD7YNDEE.mjs} +1 -1
- package/dist/browser/{analysis-change-M65AZQQG.mjs → analysis-change-2V2HZ2NY.mjs} +2 -2
- package/dist/{analysis-change-entry-YN3ELL6C.mjs → browser/analysis-change-entry-JL5U2N3Q.mjs} +1 -1
- package/dist/browser/{chunk-SRL47USS.mjs → chunk-2A2IPRC3.mjs} +1 -1
- package/dist/browser/chunk-3I27KXQD.mjs +34 -0
- package/dist/browser/{chunk-KAEVGLYN.mjs → chunk-55WYRLDZ.mjs} +15 -0
- package/dist/browser/{chunk-6OWX3OP2.mjs → chunk-7ZJTRUVW.mjs} +1 -1
- package/dist/browser/{chunk-QMNZFFD3.mjs → chunk-B3JM6Z74.mjs} +6 -2
- package/dist/browser/{chunk-BRWY3JCN.mjs → chunk-CSCKZBVJ.mjs} +4 -29
- package/dist/browser/{chunk-D6UFGBF5.mjs → chunk-GJKXW3SF.mjs} +43 -24
- package/dist/browser/{chunk-5V74FFZE.mjs → chunk-HT7J73QL.mjs} +1 -1
- package/dist/browser/{chunk-BVX2MEHA.mjs → chunk-KWYQ6KX4.mjs} +17 -17
- package/dist/browser/{chunk-2JABMB4S.mjs → chunk-PM4MUM5N.mjs} +2 -2
- package/dist/browser/{chunk-W643QV3L.mjs → chunk-QJCO3TJU.mjs} +8 -4
- package/dist/browser/{chunk-ODQP7P3H.mjs → chunk-TQ5UMFG5.mjs} +1 -1
- package/dist/browser/{chunk-4DYLCICG.mjs → chunk-VBX2TI5V.mjs} +2 -2
- package/dist/browser/{chunk-XILIT5MT.mjs → chunk-VD7JEUIR.mjs} +5 -5
- package/dist/browser/{cold-module-A5S6JFDN.mjs → cold-module-YECAK4MN.mjs} +18 -12
- package/dist/browser/{durability-wiring-W5AVV3RF.mjs → durability-wiring-LM7WFL6X.mjs} +61 -50
- package/dist/browser/{import-PTT63AGK.mjs → import-QOY6ZH6X.mjs} +3 -3
- package/dist/browser/{module-CEKA7MQH.mjs → module-KAMRAJLE.mjs} +6 -6
- package/dist/browser/{module-X5PGOE47.mjs → module-XQLEOYNM.mjs} +24 -23
- package/dist/{react-native/chunks/restore-queue-OI5EH7R3.mjs → browser/restore-queue-UQ6AAUVX.mjs} +2 -2
- package/dist/browser/{snapshot-DQ6A4PQP.mjs → snapshot-UGZVMP4H.mjs} +11 -10
- package/dist/browser/{write-MAGRAIEH.mjs → write-I5P5MW4O.mjs} +7 -7
- package/dist/{chunk-VQDZVWN3.mjs → chunk-2PNYKG2D.mjs} +16 -16
- package/dist/{chunk-U6NE6RCV.mjs → chunk-3E4RRF5J.mjs} +1 -1
- package/dist/{chunk-ZYKUD5NX.mjs → chunk-4QCSHLNM.mjs} +56 -6
- package/dist/{chunk-YKEHQUSZ.mjs → chunk-52QQWEBS.mjs} +2 -2
- package/dist/{chunk-KZ5GQE4Z.mjs → chunk-6RKSY3BX.mjs} +6 -6
- package/dist/{chunk-6C5EX2QR.mjs → chunk-7LDMWKP6.mjs} +1 -1
- package/dist/{chunk-ADBS5XRI.mjs → chunk-7TE2AJIH.mjs} +6 -6
- package/dist/{chunk-QN5WVV5K.mjs → chunk-CSHHU7PA.mjs} +5 -5
- package/dist/{chunk-ZAYWOHVG.mjs → chunk-DGRM4EZZ.mjs} +1 -1
- package/dist/{chunk-7N223GWV.mjs → chunk-DMNPYF54.mjs} +6 -2
- package/dist/{chunk-7HKWO4BJ.mjs → chunk-FDG4KXX5.mjs} +1 -1
- package/dist/{chunk-QEYF2SQ6.mjs → chunk-FNBNZCGP.mjs} +1 -1
- package/dist/{chunk-ZEKDO7YX.mjs → chunk-G5KHSM6E.mjs} +15 -0
- package/dist/{chunk-3BVGJ4JR.mjs → chunk-IJSFWGVW.mjs} +3 -28
- package/dist/{chunk-B7XIOAMK.mjs → chunk-J4BDAH2W.mjs} +1 -1
- package/dist/{chunk-CYYSZPVV.mjs → chunk-KQJVNPRM.mjs} +18 -19
- package/dist/chunk-MATMVH65.mjs +9 -0
- package/dist/{react-native/chunks/chunk-R4EEMYM6.mjs → chunk-NITCPDFL.mjs} +2 -2
- package/dist/{chunk-U2726TL5.mjs → chunk-NPXVQS33.mjs} +6 -2
- package/dist/{chunk-DOY6EG76.mjs → chunk-RBEHLIKX.mjs} +2 -2
- package/dist/{chunk-F22IOCR2.mjs → chunk-SEAJS664.mjs} +1 -1
- package/dist/{chunk-O4KUNDVF.mjs → chunk-UGVUW27S.mjs} +3 -3
- package/dist/chunk-VD7J552I.mjs +28 -0
- package/dist/{chunk-L7TIAYPX.mjs → chunk-ZHAXP7SD.mjs} +7 -7
- package/dist/{chunk-XKPNKR3V.mjs → chunk-ZS6CMXAE.mjs} +31 -10
- package/dist/{cold-module-2WWGBFJC.mjs → cold-module-PYSSBIL7.mjs} +18 -12
- package/dist/{direct-executor-QLVHMELJ.mjs → direct-executor-WYALQSMD.mjs} +2 -2
- package/dist/distribution.mjs +23 -21
- package/dist/{durability-wiring-GNWQSZI3.mjs → durability-wiring-7VBZEJLG.mjs} +19 -45
- package/dist/{import-DX55PN4G.mjs → import-GJOMB2HC.mjs} +4 -4
- package/dist/index.browser.mjs +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.react-native.mjs +1 -1
- package/dist/{module-V5K4ZP23.mjs → module-6RLIKSZQ.mjs} +8 -8
- package/dist/{module-HW6IXUM6.mjs → module-AVQEIB7O.mjs} +23 -21
- package/dist/{paged-partition-archive-FDIIWZNR.mjs → paged-partition-archive-KGRW366Y.mjs} +11 -10
- package/dist/persistence/durability/checkpoint-worker.mjs +8 -8
- package/dist/react-native/chunks/{analysis-change-HGW3L6NY.mjs → analysis-change-DXPZRGWF.mjs} +2 -2
- package/dist/{browser/analysis-change-entry-H3YIOLXZ.mjs → react-native/chunks/analysis-change-entry-CXNRW324.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-5FV4ZEVA.mjs → chunk-7IQR3SZO.mjs} +43 -24
- package/dist/react-native/chunks/{chunk-7VWQLEFV.mjs → chunk-CLE3LZ77.mjs} +6 -2
- package/dist/react-native/chunks/{chunk-SLGIAD6B.mjs → chunk-D7LFYPYI.mjs} +4 -4
- package/dist/{chunk-KZQIVGW7.mjs → react-native/chunks/chunk-DFQJ4IJB.mjs} +2 -2
- package/dist/react-native/chunks/{chunk-B6OD63Z3.mjs → chunk-FS7BYE23.mjs} +8 -4
- package/dist/react-native/chunks/chunk-HJBJBH26.mjs +34 -0
- package/dist/react-native/chunks/{chunk-YJSMEKRE.mjs → chunk-IDFMNRIC.mjs} +17 -17
- package/dist/react-native/chunks/{chunk-FKGG4UOF.mjs → chunk-JYL35A4A.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-GV5KFQ6M.mjs → chunk-KLZGAOLT.mjs} +4 -29
- package/dist/react-native/chunks/{chunk-HURV3ASY.mjs → chunk-KOCTCUXW.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-KUJOBRKS.mjs → chunk-UCJU6WNH.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-LQ6Q4L5B.mjs → chunk-VGUWIZFQ.mjs} +15 -0
- package/dist/react-native/chunks/{cold-module-TSFWLYWC.mjs → cold-module-KFGEWYEL.mjs} +16 -10
- package/dist/react-native/chunks/{durability-wiring-PZR6KOQK.mjs → durability-wiring-QKJB2QBT.mjs} +61 -50
- package/dist/react-native/chunks/{import-VTODLPLO.mjs → import-XFBCCENV.mjs} +2 -2
- package/dist/react-native/chunks/{module-VEK2KCKU.mjs → module-FHJ2GOBI.mjs} +4 -4
- package/dist/react-native/chunks/{module-JBBH6PZH.mjs → module-UJ5VUARS.mjs} +24 -23
- package/dist/{browser/restore-queue-DD4LWZK7.mjs → react-native/chunks/restore-queue-H5VCN453.mjs} +2 -2
- package/dist/react-native/chunks/{snapshot-AUZMEV36.mjs → snapshot-KVBD4LRC.mjs} +11 -10
- package/dist/react-native/chunks/{write-DDC2QBRJ.mjs → write-ES5A3WUA.mjs} +5 -5
- package/dist/{restore-queue-BQWWNNQI.mjs → restore-queue-AOF5OTQV.mjs} +2 -2
- package/dist/server.mjs +5 -5
- package/dist/{snapshot-EHXTOTW5.mjs → snapshot-WMX6JCLP.mjs} +18 -16
- package/dist/workers/entry.mjs +2 -2
- package/dist/{write-SDJXXQ2G.mjs → write-SKJ6HW7O.mjs} +7 -7
- package/package.json +7 -7
|
@@ -326,6 +326,20 @@ function decodeVectorGraphPartPayload(raw) {
|
|
|
326
326
|
function sameGraphHeader(a, b) {
|
|
327
327
|
return a.entryPoint === b.entryPoint && a.maxLayer === b.maxLayer && a.m === b.m && a.efConstruction === b.efConstruction && a.metric === b.metric && a.shuffledBuildCount === b.shuffledBuildCount && a.calibratedMeanLength === b.calibratedMeanLength;
|
|
328
328
|
}
|
|
329
|
+
function requireOneGraphPerVector(part, p) {
|
|
330
|
+
if (part.graphs.length < 2) return;
|
|
331
|
+
const held = new Uint8Array(VECTOR_GRAPH_PART_VECTORS);
|
|
332
|
+
for (const graph of part.graphs) {
|
|
333
|
+
for (let at = 0; at < graph.levels.length; at++) {
|
|
334
|
+
if (graph.levels[at] === 0) continue;
|
|
335
|
+
if (held[at] === 1) {
|
|
336
|
+
const vector = p * VECTOR_GRAPH_PART_VECTORS + at;
|
|
337
|
+
invalid2("vector graph part", `part ${p} gives vector ${vector} a node in two graphs`, { part: p, vector });
|
|
338
|
+
}
|
|
339
|
+
held[at] = 1;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
329
343
|
function assembleGraphParts(parts) {
|
|
330
344
|
const name = "vector graph part";
|
|
331
345
|
const first = parts[0];
|
|
@@ -346,6 +360,7 @@ function assembleGraphParts(parts) {
|
|
|
346
360
|
if (!fits) invalid2(name, `part ${p} gives graph ${g} ${levels} bytes of levels`, { part: p, levels });
|
|
347
361
|
partLists[g].push(graph);
|
|
348
362
|
}
|
|
363
|
+
requireOneGraphPerVector(part, p);
|
|
349
364
|
}
|
|
350
365
|
const graphs = partLists.map((list) => ({ partSize: VECTOR_GRAPH_PART_VECTORS, parts: list }));
|
|
351
366
|
return { fieldName: first.fieldName, graphs };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { magnitude, defaultRescoreDepth, defaultEfSearch, computeCodeBlockLayout, toScore, osqQuantize, createOsqScratch, scalarQueryProducts, osqEstimate, osqDistance, toDistance } from './chunk-
|
|
2
|
-
export { createHNSWIndex, osqBitsOf } from './chunk-
|
|
3
|
-
import { isDead, VECTOR_FILE_PAYLOAD_VERSION, bytesToVectors, stageQueryLevels, readTrailer } from './chunk-
|
|
4
|
-
import { readWholeSectionChecked, checkEverySectionPage, readFileRange, openPagedFile, readCacheOfThisThread, createSectionReader, closePagedFile } from './chunk-
|
|
5
|
-
export { actionPartitionsOf, adoptSegmentsOnWorker, bytesThatSegmentsHoldInMemory, checkPagedSegmentFully, closeUnusedSegments, countsAsLatestHolder, createPagedFrozenSegment, isPagedSegmentFile, keysThatSegmentsStillRead, mergePagedWindow, openFileVectorReads, openPagedSegmentScan, openPagedSnapshot, openRewriteSpill, pagedListingOf, pagedPartitionLines, pagedTombstonesFor, prepareDiskAdoption, startReadingOpeningSectionsAhead, swapPreparedPartitions, writePagedSegment } from './chunk-
|
|
1
|
+
import { magnitude, defaultRescoreDepth, defaultEfSearch, computeCodeBlockLayout, toScore, osqQuantize, createOsqScratch, scalarQueryProducts, osqEstimate, osqDistance, toDistance } from './chunk-KOCTCUXW.mjs';
|
|
2
|
+
export { createHNSWIndex, osqBitsOf } from './chunk-KOCTCUXW.mjs';
|
|
3
|
+
import { isDead, VECTOR_FILE_PAYLOAD_VERSION, bytesToVectors, stageQueryLevels, readTrailer } from './chunk-VGUWIZFQ.mjs';
|
|
4
|
+
import { readWholeSectionChecked, checkEverySectionPage, readFileRange, openPagedFile, readCacheOfThisThread, createSectionReader, closePagedFile } from './chunk-D7LFYPYI.mjs';
|
|
5
|
+
export { actionPartitionsOf, adoptSegmentsOnWorker, bytesThatSegmentsHoldInMemory, checkPagedSegmentFully, closeUnusedSegments, countsAsLatestHolder, createPagedFrozenSegment, isPagedSegmentFile, keysThatSegmentsStillRead, mergePagedWindow, openFileVectorReads, openPagedSegmentScan, openPagedSnapshot, openRewriteSpill, pagedListingOf, pagedPartitionLines, pagedTombstonesFor, prepareDiskAdoption, startReadingOpeningSectionsAhead, swapPreparedPartitions, writePagedSegment } from './chunk-D7LFYPYI.mjs';
|
|
6
6
|
import './chunk-R4OPUZQ5.mjs';
|
|
7
7
|
import './chunk-BRNAVOKP.mjs';
|
|
8
8
|
import './chunk-UFNCLEQM.mjs';
|
|
9
|
-
import { COLD_LOAD_WAIT_WITHOUT_SEARCH_MS, loadFailed, decodeSections, SEGMENT_PAGE_BYTES, RECORD_PAGE_BYTES, COLD_WALK_NODES_READ_AHEAD } from './chunk-
|
|
10
|
-
import './chunk-
|
|
11
|
-
import { yieldToEventLoop, HEADER_SIZE, crc32 } from './chunk-
|
|
9
|
+
import { COLD_LOAD_WAIT_WITHOUT_SEARCH_MS, loadFailed, decodeSections, SEGMENT_PAGE_BYTES, RECORD_PAGE_BYTES, COLD_WALK_NODES_READ_AHEAD } from './chunk-FS7BYE23.mjs';
|
|
10
|
+
import './chunk-CLE3LZ77.mjs';
|
|
11
|
+
import { yieldToEventLoop, HEADER_SIZE, crc32, readHeader } from './chunk-IDFMNRIC.mjs';
|
|
12
12
|
import './chunk-LQAKO5QV.mjs';
|
|
13
13
|
import './chunk-NNE4VDMM.mjs';
|
|
14
14
|
import './chunk-L4M7QJNP.mjs';
|
|
@@ -317,9 +317,15 @@ var BIN16_MAX_BYTES = 65535;
|
|
|
317
317
|
var VECTOR_PAGE_SIZES = /* @__PURE__ */ new Set([SEGMENT_PAGE_BYTES, RECORD_PAGE_BYTES]);
|
|
318
318
|
var NEIGHBOUR_PAGE_SIZES = /* @__PURE__ */ new Set([RECORD_PAGE_BYTES]);
|
|
319
319
|
var LEVEL_PAGE_SIZES = /* @__PURE__ */ new Set([SEGMENT_PAGE_BYTES]);
|
|
320
|
+
function holdsRawPayload(path) {
|
|
321
|
+
const header = new Uint8Array(HEADER_SIZE);
|
|
322
|
+
readFileRange(path, 0, header);
|
|
323
|
+
return !readHeader(header).flags.compressionEnabled;
|
|
324
|
+
}
|
|
320
325
|
function readHead(path, ref) {
|
|
321
326
|
const { headOffset, headLength, headChecksum } = ref;
|
|
322
327
|
if (headOffset === void 0 || headLength === void 0 || headChecksum === void 0) return null;
|
|
328
|
+
if (!holdsRawPayload(path)) return null;
|
|
323
329
|
const head = new Uint8Array(headLength);
|
|
324
330
|
readFileRange(path, HEADER_SIZE + headOffset, head);
|
|
325
331
|
if (crc32(head) !== headChecksum) {
|
|
@@ -673,11 +679,11 @@ function openColdVectorField(input) {
|
|
|
673
679
|
var FILE_PAGE_SIZES = /* @__PURE__ */ new Set([SEGMENT_PAGE_BYTES, RECORD_PAGE_BYTES]);
|
|
674
680
|
var FLOAT32_BYTES = 4;
|
|
675
681
|
var FLOAT64_BYTES2 = 8;
|
|
676
|
-
function waitBeforeColdLoad(
|
|
682
|
+
function waitBeforeColdLoad(loadingWanted) {
|
|
677
683
|
return new Promise((resolve) => {
|
|
678
684
|
const timer = setTimeout(resolve, COLD_LOAD_WAIT_WITHOUT_SEARCH_MS);
|
|
679
685
|
if (typeof timer.unref === "function") timer.unref();
|
|
680
|
-
void
|
|
686
|
+
void loadingWanted.then(() => {
|
|
681
687
|
clearTimeout(timer);
|
|
682
688
|
resolve();
|
|
683
689
|
});
|
package/dist/react-native/chunks/{durability-wiring-PZR6KOQK.mjs → durability-wiring-QKJB2QBT.mjs}
RENAMED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { writeMetadataEnvelope, decodeSegmentManifest, metadataFromConfig, SINGLE_NODE_PRIMARY_TERM, readMetadataEnvelope, createSeqOwner, readSegmentManifest, reclaimUnlistedKeys, loadSegmentedCheckpoint, checkpointLastSeqNo, nextSegmentKey, isRecord, invalidManifest, deserializePayloadV2, unpackEnvelopeBytes, checkpointPrimaryTerm, frameRecord, isId, isUint32, isSequenceNumber, writeCheckpointSegments, partitionContentsOf, writeLiveVectors, commitCheckpointManifest, removeCheckpointGarbage, readWalSegments, durableRecordMissing, growPartitionsTo, writeSegmentHeader, VECTOR_FILE_ENVELOPE_VERSION,
|
|
1
|
+
import { writeMetadataEnvelope, decodeSegmentManifest, metadataFromConfig, SINGLE_NODE_PRIMARY_TERM, readMetadataEnvelope, createSeqOwner, readSegmentManifest, reclaimUnlistedKeys, loadSegmentedCheckpoint, checkpointLastSeqNo, nextSegmentKey, isRecord, invalidManifest, deserializePayloadV2, unpackEnvelopeBytes, checkpointPrimaryTerm, frameRecord, isId, isUint32, isSequenceNumber, writeCheckpointSegments, partitionContentsOf, writeLiveVectors, commitCheckpointManifest, removeCheckpointGarbage, readWalSegments, durableRecordMissing, growPartitionsTo, writeSegmentHeader, VECTOR_FILE_ENVELOPE_VERSION, readCommitMarker, nextMarkerSlot, encodeMarkerSlot, markerSlotOffset, documentsOfPayloadV2, SEGMENT_HEADER_SIZE, metadataConfigOf, durableMetadataConfigOf, buildEntry, readCurrentManifest, captureWholePartition } from './chunk-7IQR3SZO.mjs';
|
|
2
2
|
import { nodeThreadId } from './chunk-PSWKQVVT.mjs';
|
|
3
|
-
import
|
|
3
|
+
import './chunk-HJBJBH26.mjs';
|
|
4
|
+
import { decodeVectorIndexParts, VECTOR_FILE_MAX_VECTORS, deadBytesFor, countDead, decodeVectorFilePayload, decodeVectorGraphPayload, graphPartsOfEarlierPayload } from './chunk-VGUWIZFQ.mjs';
|
|
4
5
|
import './chunk-LRGWK367.mjs';
|
|
5
|
-
import { DEFAULT_SEGMENT_MAX_BYTES, DEFAULT_CHECKPOINT_INTERVAL_MS, DEFAULT_CHECKPOINT_MUTATION_THRESHOLD, DEFAULT_COMPACTION_THRESHOLD, DEFAULT_ASYNC_FLUSH_INTERVAL_MS, WRITES_STALL_ABOVE_UNCHECKPOINTED_BYTES, directoryCheckpointStore, manifestKey, readListedFile, adapterCheckpointStore, DIRECTORY_LOCK_ATTEMPTS, snapshotBundleKey, manifestReferencedKeys, manifestFileRefs, PHONE_FILE_CHUNK_BYTES, DIRECTORY_LOCK_SETTLE_MS, DIRECTORY_LOCK_PROCESS_START_TOLERANCE_MS, readSegmentFile, MAX_SEGMENTS_PER_PARTITION, DIRECTORY_IDENTITY_CHECK_INTERVAL_MS, WHOLE_PARTITION_LARGEST_DOCUMENT_COUNT, WHOLE_PARTITION_MIN_CHANGED_SHARE, CHECKPOINT_TIMEOUT_RECOVERY_BACKOFF_MS, CHECKPOINT_WORKER_TIMEOUT_MS, CHECKPOINT_WORKER_IDLE_MS, LOG_RECORDS_PER_CHECKPOINT } from './chunk-
|
|
6
|
-
import { applyDeleteEntry, applyIndexEntry } from './chunk-
|
|
7
|
-
import { toError, openChecksummedEnvelope, HEADER_SIZE, buildSegmentPayload, resolvePartitionInsertOptions, freezeSegmentShared, createSharedFrozenSegment } from './chunk-
|
|
6
|
+
import { DEFAULT_SEGMENT_MAX_BYTES, DEFAULT_CHECKPOINT_INTERVAL_MS, DEFAULT_CHECKPOINT_MUTATION_THRESHOLD, DEFAULT_COMPACTION_THRESHOLD, DEFAULT_ASYNC_FLUSH_INTERVAL_MS, WRITES_STALL_ABOVE_UNCHECKPOINTED_BYTES, directoryCheckpointStore, manifestKey, readListedFile, adapterCheckpointStore, DIRECTORY_LOCK_ATTEMPTS, snapshotBundleKey, manifestReferencedKeys, manifestFileRefs, PHONE_FILE_CHUNK_BYTES, DIRECTORY_LOCK_SETTLE_MS, DIRECTORY_LOCK_PROCESS_START_TOLERANCE_MS, readSegmentFile, MAX_SEGMENTS_PER_PARTITION, DIRECTORY_IDENTITY_CHECK_INTERVAL_MS, WHOLE_PARTITION_LARGEST_DOCUMENT_COUNT, WHOLE_PARTITION_MIN_CHANGED_SHARE, CHECKPOINT_TIMEOUT_RECOVERY_BACKOFF_MS, CHECKPOINT_WORKER_TIMEOUT_MS, CHECKPOINT_WORKER_IDLE_MS, LOG_RECORDS_PER_CHECKPOINT } from './chunk-FS7BYE23.mjs';
|
|
7
|
+
import { applyDeleteEntry, applyIndexEntry } from './chunk-CLE3LZ77.mjs';
|
|
8
|
+
import { toError, openChecksummedEnvelope, HEADER_SIZE, buildSegmentPayload, resolvePartitionInsertOptions, freezeSegmentShared, createSharedFrozenSegment } from './chunk-IDFMNRIC.mjs';
|
|
8
9
|
import { turnsAreBudgeted, turnIsSpent, yieldTurn, waitOutsideCountedWrite, detectRuntime } from './chunk-LQAKO5QV.mjs';
|
|
9
10
|
import { createRequestId } from './chunk-NNE4VDMM.mjs';
|
|
10
11
|
import { fnv1a } from './chunk-L4M7QJNP.mjs';
|
|
@@ -1382,6 +1383,34 @@ function formatSegmentStart(startSeqNo) {
|
|
|
1382
1383
|
return startSeqNo.toString().padStart(16, "0");
|
|
1383
1384
|
}
|
|
1384
1385
|
|
|
1386
|
+
// src/persistence/durability/marker-writer.ts
|
|
1387
|
+
function markerKey(indexName, partitionId) {
|
|
1388
|
+
return `${indexName}/wal/${partitionId}/commit`;
|
|
1389
|
+
}
|
|
1390
|
+
async function createMarkerWriter(directory, indexName, partitionId) {
|
|
1391
|
+
const key = markerKey(indexName, partitionId);
|
|
1392
|
+
const handle = await directory.markerHandle(key);
|
|
1393
|
+
const existing = await handle.read();
|
|
1394
|
+
const current = readCommitMarker(existing);
|
|
1395
|
+
const createdFresh = existing.length === 0;
|
|
1396
|
+
let lastSlot = current?.slotIndex ?? null;
|
|
1397
|
+
let writeSeq = current?.state.writeSeq ?? 0;
|
|
1398
|
+
return {
|
|
1399
|
+
created: createdFresh,
|
|
1400
|
+
existingHighestDurableSeqNo: current?.state.highestDurableSeqNo ?? 0,
|
|
1401
|
+
async commit(state) {
|
|
1402
|
+
const slotIndex = nextMarkerSlot(lastSlot);
|
|
1403
|
+
writeSeq += 1;
|
|
1404
|
+
const slot = encodeMarkerSlot({ ...state, writeSeq });
|
|
1405
|
+
await handle.writeSlot(markerSlotOffset(slotIndex), slot);
|
|
1406
|
+
lastSlot = slotIndex;
|
|
1407
|
+
},
|
|
1408
|
+
async close() {
|
|
1409
|
+
await handle.close();
|
|
1410
|
+
}
|
|
1411
|
+
};
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1385
1414
|
// src/persistence/durability/recovery.ts
|
|
1386
1415
|
async function removeLeftoverRewriteFiles(directory, names) {
|
|
1387
1416
|
for (const indexName of names) {
|
|
@@ -1438,11 +1467,33 @@ async function replayWal(directory, indexName, partitionId, fromSeqNoExclusive,
|
|
|
1438
1467
|
await replay(activeTail.entries);
|
|
1439
1468
|
}
|
|
1440
1469
|
await deleteOrphanSegments(directory, segments, marker.state.activeSegmentSeqNo);
|
|
1441
|
-
if (activeTail !== null
|
|
1442
|
-
await
|
|
1470
|
+
if (activeTail !== null) {
|
|
1471
|
+
await makeReplayedTailDurable(directory, indexName, partitionId, marker, activeTail);
|
|
1443
1472
|
}
|
|
1444
1473
|
return { highestSeqNo, highestPrimaryTerm };
|
|
1445
1474
|
}
|
|
1475
|
+
async function makeReplayedTailDurable(directory, indexName, partitionId, marker, tail) {
|
|
1476
|
+
const lastReplayed = tail.entries.at(-1);
|
|
1477
|
+
if (lastReplayed === void 0 && tail.cleanEnd >= tail.segmentLength) return;
|
|
1478
|
+
const handle = await directory.appendHandle(tail.key);
|
|
1479
|
+
try {
|
|
1480
|
+
if (tail.cleanEnd < await handle.size()) await handle.truncate(tail.cleanEnd);
|
|
1481
|
+
else await handle.sync();
|
|
1482
|
+
} finally {
|
|
1483
|
+
await handle.close();
|
|
1484
|
+
}
|
|
1485
|
+
if (lastReplayed === void 0) return;
|
|
1486
|
+
const writer = await createMarkerWriter(directory, indexName, partitionId);
|
|
1487
|
+
try {
|
|
1488
|
+
await writer.commit({
|
|
1489
|
+
activeSegmentSeqNo: marker.state.activeSegmentSeqNo,
|
|
1490
|
+
durableByteLength: tail.cleanEnd,
|
|
1491
|
+
highestDurableSeqNo: Math.max(marker.state.highestDurableSeqNo, lastReplayed.seqNo)
|
|
1492
|
+
});
|
|
1493
|
+
} finally {
|
|
1494
|
+
await writer.close();
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1446
1497
|
async function deleteOrphanSegments(directory, segments, activeSegmentSeqNo) {
|
|
1447
1498
|
for (const { key, startSeqNo } of segments) {
|
|
1448
1499
|
if (startSeqNo > activeSegmentSeqNo) {
|
|
@@ -1450,18 +1501,6 @@ async function deleteOrphanSegments(directory, segments, activeSegmentSeqNo) {
|
|
|
1450
1501
|
}
|
|
1451
1502
|
}
|
|
1452
1503
|
}
|
|
1453
|
-
async function truncateSegmentTail(directory, key, durableByteLength) {
|
|
1454
|
-
const cleanLength = Math.max(durableByteLength, SEGMENT_HEADER_SIZE);
|
|
1455
|
-
const handle = await directory.appendHandle(key);
|
|
1456
|
-
try {
|
|
1457
|
-
const currentSize = await handle.size();
|
|
1458
|
-
if (cleanLength < currentSize) {
|
|
1459
|
-
await handle.truncate(cleanLength);
|
|
1460
|
-
}
|
|
1461
|
-
} finally {
|
|
1462
|
-
await handle.close();
|
|
1463
|
-
}
|
|
1464
|
-
}
|
|
1465
1504
|
function applyEntry(entry, deps) {
|
|
1466
1505
|
deps.writeRecords?.replayed(entry);
|
|
1467
1506
|
if (entry.operation === "DELETE") {
|
|
@@ -1944,7 +1983,7 @@ async function writeOneBoundedCheckpoint(input) {
|
|
|
1944
1983
|
}
|
|
1945
1984
|
async function adoptWrittenSegments(input, manager, partitions, changes) {
|
|
1946
1985
|
const { indexName, indexState, hooks } = input;
|
|
1947
|
-
const { actionPartitionsOf, closeUnusedSegments, prepareDiskAdoption, swapPreparedPartitions } = await import('./module-
|
|
1986
|
+
const { actionPartitionsOf, closeUnusedSegments, prepareDiskAdoption, swapPreparedPartitions } = await import('./module-FHJ2GOBI.mjs');
|
|
1948
1987
|
const adoption = await prepareDiskAdoption(input.directory, manager, partitions);
|
|
1949
1988
|
if (adoption === null) return [];
|
|
1950
1989
|
const adopted = await whileNoMutationApplies([...indexState.partitions.values()], () => {
|
|
@@ -1999,7 +2038,7 @@ async function finishBoundedCheckpoint(input, manager, store, metadata, priorMan
|
|
|
1999
2038
|
const droppedThisCheckpoint = changes !== null && capture2.recordsLeftInLog === 0 ? new Set(await adoptWrittenSegments(input, manager, segments.partitions, changes)) : /* @__PURE__ */ new Set();
|
|
2000
2039
|
if (!input.holdsCheckpointFiles()) {
|
|
2001
2040
|
const removable = await garbageThatNoFieldStillReads(store, vectorIndexes, written.garbage);
|
|
2002
|
-
const stillRead = metadata.textStorage === "disk" ? (await import('./module-
|
|
2041
|
+
const stillRead = metadata.textStorage === "disk" ? (await import('./module-FHJ2GOBI.mjs')).keysThatSegmentsStillRead(manager) : /* @__PURE__ */ new Set();
|
|
2003
2042
|
await removeCheckpointGarbage(
|
|
2004
2043
|
store,
|
|
2005
2044
|
removable.filter((key) => !droppedThisCheckpoint.has(key) && !stillRead.has(key))
|
|
@@ -2487,34 +2526,6 @@ function createGroupCommitCoordinator(sync) {
|
|
|
2487
2526
|
};
|
|
2488
2527
|
}
|
|
2489
2528
|
|
|
2490
|
-
// src/persistence/durability/marker-writer.ts
|
|
2491
|
-
function markerKey(indexName, partitionId) {
|
|
2492
|
-
return `${indexName}/wal/${partitionId}/commit`;
|
|
2493
|
-
}
|
|
2494
|
-
async function createMarkerWriter(directory, indexName, partitionId) {
|
|
2495
|
-
const key = markerKey(indexName, partitionId);
|
|
2496
|
-
const handle = await directory.markerHandle(key);
|
|
2497
|
-
const existing = await handle.read();
|
|
2498
|
-
const current = readCommitMarker(existing);
|
|
2499
|
-
const createdFresh = existing.length === 0;
|
|
2500
|
-
let lastSlot = current?.slotIndex ?? null;
|
|
2501
|
-
let writeSeq = current?.state.writeSeq ?? 0;
|
|
2502
|
-
return {
|
|
2503
|
-
created: createdFresh,
|
|
2504
|
-
existingHighestDurableSeqNo: current?.state.highestDurableSeqNo ?? 0,
|
|
2505
|
-
async commit(state) {
|
|
2506
|
-
const slotIndex = nextMarkerSlot(lastSlot);
|
|
2507
|
-
writeSeq += 1;
|
|
2508
|
-
const slot = encodeMarkerSlot({ ...state, writeSeq });
|
|
2509
|
-
await handle.writeSlot(markerSlotOffset(slotIndex), slot);
|
|
2510
|
-
lastSlot = slotIndex;
|
|
2511
|
-
},
|
|
2512
|
-
async close() {
|
|
2513
|
-
await handle.close();
|
|
2514
|
-
}
|
|
2515
|
-
};
|
|
2516
|
-
}
|
|
2517
|
-
|
|
2518
2529
|
// src/persistence/durability/wal-writer.ts
|
|
2519
2530
|
var SEGMENT_TAIL_PATTERN = /^\d{16}$/;
|
|
2520
2531
|
function segmentKey(indexName, partitionId, startSeqNo) {
|
|
@@ -3243,7 +3254,7 @@ var decoder = new TextDecoder();
|
|
|
3243
3254
|
async function countPagedPartition(store, partition) {
|
|
3244
3255
|
const { directory } = store;
|
|
3245
3256
|
if (directory === void 0 || partition.segments.length === 0) return null;
|
|
3246
|
-
const { countsAsLatestHolder, isPagedSegmentFile, openPagedSegmentScan } = await import('./module-
|
|
3257
|
+
const { countsAsLatestHolder, isPagedSegmentFile, openPagedSegmentScan } = await import('./module-FHJ2GOBI.mjs');
|
|
3247
3258
|
for (const ref of partition.segments) if (!await isPagedSegmentFile(directory, ref.key)) return null;
|
|
3248
3259
|
const scans = [];
|
|
3249
3260
|
try {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { DOCUMENT_EXPORT_FORMAT, DOCUMENT_EXPORT_VERSION, readDocumentExport } from './chunk-
|
|
1
|
+
export { DOCUMENT_EXPORT_FORMAT, DOCUMENT_EXPORT_VERSION, readDocumentExport } from './chunk-UCJU6WNH.mjs';
|
|
2
2
|
import './chunk-QC4ZRBSX.mjs';
|
|
3
3
|
import './chunk-BRNAVOKP.mjs';
|
|
4
|
-
import './chunk-
|
|
4
|
+
import './chunk-IDFMNRIC.mjs';
|
|
5
5
|
import './chunk-LQAKO5QV.mjs';
|
|
6
6
|
import './chunk-NNE4VDMM.mjs';
|
|
7
7
|
import './chunk-L4M7QJNP.mjs';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { actionPartitionsOf, adoptSegmentsOnWorker, bytesThatSegmentsHoldInMemory, checkPagedSegmentFully, closeUnusedSegments, countsAsLatestHolder, createPagedFrozenSegment, isPagedSegmentFile, keysThatSegmentsStillRead, mergePagedWindow, openFileVectorReads, openPagedSegmentScan, openPagedSnapshot, openRewriteSpill, pagedListingOf, pagedPartitionLines, pagedTombstonesFor, prepareDiskAdoption, startReadingOpeningSectionsAhead, swapPreparedPartitions, writePagedSegment } from './chunk-
|
|
1
|
+
export { actionPartitionsOf, adoptSegmentsOnWorker, bytesThatSegmentsHoldInMemory, checkPagedSegmentFully, closeUnusedSegments, countsAsLatestHolder, createPagedFrozenSegment, isPagedSegmentFile, keysThatSegmentsStillRead, mergePagedWindow, openFileVectorReads, openPagedSegmentScan, openPagedSnapshot, openRewriteSpill, pagedListingOf, pagedPartitionLines, pagedTombstonesFor, prepareDiskAdoption, startReadingOpeningSectionsAhead, swapPreparedPartitions, writePagedSegment } from './chunk-D7LFYPYI.mjs';
|
|
2
2
|
import './chunk-R4OPUZQ5.mjs';
|
|
3
3
|
import './chunk-BRNAVOKP.mjs';
|
|
4
4
|
import './chunk-UFNCLEQM.mjs';
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
5
|
+
import './chunk-FS7BYE23.mjs';
|
|
6
|
+
import './chunk-CLE3LZ77.mjs';
|
|
7
|
+
import './chunk-IDFMNRIC.mjs';
|
|
8
8
|
import './chunk-LQAKO5QV.mjs';
|
|
9
9
|
import './chunk-NNE4VDMM.mjs';
|
|
10
10
|
import './chunk-L4M7QJNP.mjs';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { VECTOR_WORKER_COPIES_ALLOWED,
|
|
1
|
+
import { VECTOR_WORKER_COPIES_ALLOWED, noBuildHistory, recordCheckpoint, assignStorePartitions, liveSize, ordinalFilterForSubsets, handOverBuildTurns, filterForOptions, graphNeedsRebuild, yieldBuildTurn, threadsHoldCurrentLayout, emptyFieldBeforeRestore, recalibrateFromStore, signatureOf, allLiveDocIds, fieldHandlesOf, releaseReplacedVectors, adoptGraph, liveOrdinals, adoptLoadedCalibration, planCheckpoint, deserialize } from './chunk-KLZGAOLT.mjs';
|
|
2
2
|
import './chunk-PSWKQVVT.mjs';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import { DEFAULT_PROMOTION_THRESHOLD, DEFAULT_FILTER_THRESHOLD, defaultQuantizationFor, DEFAULT_VECTOR_METRIC, ESTIMATED_MS_PER_TOMBSTONE, ESTIMATED_MS_PER_VECTOR_REBUILD, WORKER_COPY_MIN_VECTORS, SHUFFLED_REBUILD_MEMORY_RETRY_MS, SEARCH_ATTEMPTS_BEFORE_HOLDING_WRITES, BUILD_RETRY_MAX_DELAY_MS, BUILD_RETRY_FIRST_DELAY_MS, BUILD_STEPS_BETWEEN_CLOCK_CHECKS, RECALIBRATION_CHUNK_VECTORS, BUILD_CHUNK_SIZE, SEARCH_REFILL_RESERVE, SEARCH_SCAN_CHUNK_VECTORS, DRIFT_CHECK_GROWTH_FACTOR, RECALIBRATION_DRIFT_RATIO, DISK_ADOPTION_YIELD_INTERVAL } from './chunk-HJBJBH26.mjs';
|
|
4
|
+
import { openSharedQuantizer, STORE_ORDINAL_LAYOUT_GENERATION, searchOrdinals, insertNode, GRAPH_RETIRED, nodeCountOf, tombstoneCountOf, osqBitsOf, createOsqQuantizer, ordinalFilterValues, openGraphState, STORE_UNPLACED_COUNT, STORE_LIVE_COUNT, STORE_REMOVED_COUNT, fixedView, VECTOR_MEMORY_LIMITS, sharedVectorStoreBytes, STORE_SLOTS, IN_MEMORY, resetStoreHeader, STORE_RELEASED_VECTORS_TO_DISK, magnitude, createOrdinalFilter, addToOrdinalFilter, nativeScoresOf, toScore, ordinalFilterHas, threadedNativeCore, openVectorBlock, NOTHING_STAGED, arenaFloat32Distance, slotByteOffset, detachNativeStore, STORE_BLOCK_COUNT, STORE_CODE_BLOCK_COUNT, createSharedVectorStoreHandles, STORE_DOC_ID_BYTES, unplacedChunkCount, blocksGrowthBytes, growBufferTo, nativeStoreScratchBytes, noteFallback, toDistance, QUERY_STAGED, euclideanDistance, dotProduct, cosineSimilarityWithMagnitudes, grownByteLength, createVectorBlock, ensureBlockSlots, sharedMemoryAvailable, createHNSWIndex, topLayerInParts, shuffleInPlace, requireWholeNeighbourLists, createCentroidSums, shuffleStep, centroidOfCentroidSums, meanOfCentroidSums, countOfCentroidSums, squaredLengthsOfCentroidSums, nativeStoreFor, withNativeThreadSlot, nativeMetricCode, NATIVE_OK, releaseLocksHeldBy } from './chunk-KOCTCUXW.mjs';
|
|
5
|
+
export { releaseLocksHeldBy } from './chunk-KOCTCUXW.mjs';
|
|
6
|
+
import { NO_LIVE_VECTOR_AT_POSITION, bytesToVectors, isDead } from './chunk-VGUWIZFQ.mjs';
|
|
6
7
|
import { createVectorFileReader } from './chunk-UFNCLEQM.mjs';
|
|
7
8
|
import { createDocIdMap, turnsAreBudgeted, yieldBackgroundTurn, chargeHeapBytes, holdWritesAndBackgroundWork, backgroundTurnIsSpent, turnIsSpent, yieldTurn, noteThreadSlotLive, noteThreadSlotGone } from './chunk-LQAKO5QV.mjs';
|
|
8
9
|
import { MAX_RENUMBERED_SEARCH_ATTEMPTS, DISK_STORAGE_BLOCK_BYTES, UNPLACED_FLAG_CHUNK_ORDINALS, GRAPH_BUILD_CHUNKS_IN_FLIGHT_PER_WORKER, GRAPH_BUILD_DISPATCH_CHUNK, NATIVE_THREAD_SCAN_CHUNK_ORDINALS, resolveWorkerCount, VECTOR_SEARCH_TIMEOUT_MS, VECTOR_SEARCH_LOAD_TIMEOUT_MS, VECTOR_SCRATCH_SLOTS, VECTOR_INSERT_TIMEOUT_MS } from './chunk-L4M7QJNP.mjs';
|
|
@@ -2919,11 +2920,11 @@ function beginCheckpointRestore(state, shape) {
|
|
|
2919
2920
|
}
|
|
2920
2921
|
|
|
2921
2922
|
// src/vector/vector-index/cold.ts
|
|
2922
|
-
function beginColdHold(state, field, loaded,
|
|
2923
|
+
function beginColdHold(state, field, loaded, loadWanted) {
|
|
2923
2924
|
const hold = {
|
|
2924
2925
|
field,
|
|
2925
2926
|
loaded,
|
|
2926
|
-
|
|
2927
|
+
loadWanted,
|
|
2927
2928
|
written: /* @__PURE__ */ new Map(),
|
|
2928
2929
|
removedNumbers: /* @__PURE__ */ new Set(),
|
|
2929
2930
|
removedIds: /* @__PURE__ */ new Set(),
|
|
@@ -2940,6 +2941,12 @@ function endColdHold(state) {
|
|
|
2940
2941
|
for (const write of hold.writes) write();
|
|
2941
2942
|
hold.field.close();
|
|
2942
2943
|
}
|
|
2944
|
+
async function untilColdLoaded(state) {
|
|
2945
|
+
while (state.cold !== null) {
|
|
2946
|
+
state.cold.loadWanted();
|
|
2947
|
+
await state.cold.loaded;
|
|
2948
|
+
}
|
|
2949
|
+
}
|
|
2943
2950
|
function cancelColdHold(state) {
|
|
2944
2951
|
const hold = state.cold;
|
|
2945
2952
|
if (hold === null) return;
|
|
@@ -2954,15 +2961,15 @@ function openColdField(state, field, load) {
|
|
|
2954
2961
|
finished = resolve;
|
|
2955
2962
|
failed = reject;
|
|
2956
2963
|
});
|
|
2957
|
-
let
|
|
2958
|
-
const
|
|
2959
|
-
|
|
2964
|
+
let loadWanted = () => void 0;
|
|
2965
|
+
const loadingWanted = new Promise((resolve) => {
|
|
2966
|
+
loadWanted = resolve;
|
|
2960
2967
|
});
|
|
2961
|
-
const hold = beginColdHold(state, field, loaded,
|
|
2968
|
+
const hold = beginColdHold(state, field, loaded, loadWanted);
|
|
2962
2969
|
void load(
|
|
2963
2970
|
(shape) => beginCheckpointRestore(state, shape),
|
|
2964
2971
|
() => state.cold === hold,
|
|
2965
|
-
|
|
2972
|
+
loadingWanted
|
|
2966
2973
|
).then(
|
|
2967
2974
|
() => {
|
|
2968
2975
|
if (state.cold === hold) endColdHold(state);
|
|
@@ -3117,21 +3124,21 @@ function outcomeOfGraphWalk(hold, walk, fromGraph, query, k, options) {
|
|
|
3117
3124
|
function coldSearch(state, hold, query, k, options) {
|
|
3118
3125
|
const walk = outcomeWithoutGraphWalk(state, hold, query, k, options);
|
|
3119
3126
|
if ("results" in walk) {
|
|
3120
|
-
hold.
|
|
3127
|
+
hold.loadWanted();
|
|
3121
3128
|
return walk;
|
|
3122
3129
|
}
|
|
3123
3130
|
const fromGraph = hold.field.search(query, k, options, walk.admits, hold.removedNumbers);
|
|
3124
|
-
hold.
|
|
3131
|
+
hold.loadWanted();
|
|
3125
3132
|
return outcomeOfGraphWalk(hold, walk, fromGraph, query, k, options);
|
|
3126
3133
|
}
|
|
3127
3134
|
async function coldSearchConcurrently(state, hold, query, k, options) {
|
|
3128
3135
|
const walk = outcomeWithoutGraphWalk(state, hold, query, k, options);
|
|
3129
3136
|
if ("results" in walk) {
|
|
3130
|
-
hold.
|
|
3137
|
+
hold.loadWanted();
|
|
3131
3138
|
return walk;
|
|
3132
3139
|
}
|
|
3133
3140
|
const fromGraph = await hold.field.searchConcurrently(query, k, options, walk.admits, hold.removedNumbers);
|
|
3134
|
-
hold.
|
|
3141
|
+
hold.loadWanted();
|
|
3135
3142
|
return outcomeOfGraphWalk(hold, walk, fromGraph, query, k, options);
|
|
3136
3143
|
}
|
|
3137
3144
|
|
|
@@ -3789,10 +3796,6 @@ function createVectorWrites(state) {
|
|
|
3789
3796
|
}
|
|
3790
3797
|
|
|
3791
3798
|
// src/vector/vector-index/index.ts
|
|
3792
|
-
function defaultQuantizationFor(dimension) {
|
|
3793
|
-
if (dimension >= OSQ4_MIN_DIMENSION) return "osq4";
|
|
3794
|
-
return "osq8";
|
|
3795
|
-
}
|
|
3796
3799
|
function createVectorIndex(fieldName, dimension, config, workerCopies = VECTOR_WORKER_COPIES_ALLOWED, indexName = "", storage = "memory", onLoadedGraphRepaired = () => void 0) {
|
|
3797
3800
|
if (!Number.isInteger(dimension) || dimension <= 0) {
|
|
3798
3801
|
throw new NarsilError(
|
|
@@ -3805,7 +3808,7 @@ function createVectorIndex(fieldName, dimension, config, workerCopies = VECTOR_W
|
|
|
3805
3808
|
const filterThreshold = Math.max(0, Math.min(1, config?.filterThreshold ?? DEFAULT_FILTER_THRESHOLD));
|
|
3806
3809
|
const quantizationMode = config?.quantization ?? defaultQuantizationFor(dimension);
|
|
3807
3810
|
const codeBits = osqBitsOf(quantizationMode);
|
|
3808
|
-
const metric = config?.hnswConfig?.metric ??
|
|
3811
|
+
const metric = config?.hnswConfig?.metric ?? DEFAULT_VECTOR_METRIC;
|
|
3809
3812
|
const rawHnswM = config?.hnswConfig?.m;
|
|
3810
3813
|
const hnswConfig = config?.hnswConfig ? { ...config.hnswConfig, m: rawHnswM !== void 0 ? Math.max(rawHnswM, 2) : void 0 } : void 0;
|
|
3811
3814
|
const dimensionScale = dimension / 256;
|
|
@@ -3875,9 +3878,7 @@ function createVectorIndex(fieldName, dimension, config, workerCopies = VECTOR_W
|
|
|
3875
3878
|
if (state.cold !== null) return coldHas(state.cold, docId);
|
|
3876
3879
|
return state.store.has(docId) && !state.tombstones.has(docId);
|
|
3877
3880
|
}
|
|
3878
|
-
|
|
3879
|
-
while (state.cold !== null) await state.cold.loaded;
|
|
3880
|
-
}
|
|
3881
|
+
const whenLoaded = () => untilColdLoaded(state);
|
|
3881
3882
|
async function searchParallel(query, k, options) {
|
|
3882
3883
|
if (state.graphsHeldOffThread !== null) await untilGraphReleased(state);
|
|
3883
3884
|
if (state.cold !== null) return coldSearchConcurrently(state, state.cold, query, k, options);
|
package/dist/{browser/restore-queue-DD4LWZK7.mjs → react-native/chunks/restore-queue-H5VCN453.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { abandonChangeOf } from './chunk-
|
|
1
|
+
import { abandonChangeOf } from './chunk-DFQJ4IJB.mjs';
|
|
2
2
|
|
|
3
3
|
// src/narsil/restore-queue.ts
|
|
4
4
|
function restoreDepsOf(core, host) {
|
|
@@ -24,7 +24,7 @@ function restoreDepsOf(core, host) {
|
|
|
24
24
|
function queueRestore(core, host, restoresInFlight, indexName, data) {
|
|
25
25
|
const previous = restoresInFlight.get(indexName) ?? Promise.resolve();
|
|
26
26
|
const restored = previous.then(async () => {
|
|
27
|
-
const { restoreFromSnapshot } = await import('./snapshot-
|
|
27
|
+
const { restoreFromSnapshot } = await import('./snapshot-KVBD4LRC.mjs');
|
|
28
28
|
await restoreFromSnapshot(indexName, data, restoreDepsOf(core, host));
|
|
29
29
|
});
|
|
30
30
|
const settled = restored.then(
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { createByteReader, restoredConfigFields, restoredEmbedding, rejectSnapshot } from './chunk-QC4ZRBSX.mjs';
|
|
2
|
-
import { vectorsPerFile } from './chunk-
|
|
3
|
-
import { MAX_SNAPSHOT_ANALYSIS_ATTEMPTS, requireRestoreMemory, earlierSnapshotFootprint, archiveFootprint, storedBytesOfSegments } from './chunk-
|
|
4
|
-
import { indexMetadataOf, writeCheckpointSegments, writeLiveVectors, commitCheckpointManifest, decodeSegmentManifest, SINGLE_NODE_PRIMARY_TERM, partitionContentsOf, unpackIndexSnapshotEnvelope, loadSegmentedCheckpoint, writeMetadataEnvelope, openManifestPayload, listedKeysOf, decodeManifestPayload, readVectorFile, readGraphParts, documentsOfPayloadV2, deserializePayloadV1 } from './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import
|
|
2
|
+
import { vectorsPerFile } from './chunk-KLZGAOLT.mjs';
|
|
3
|
+
import { MAX_SNAPSHOT_ANALYSIS_ATTEMPTS, requireRestoreMemory, earlierSnapshotFootprint, archiveFootprint, storedBytesOfSegments } from './chunk-JYL35A4A.mjs';
|
|
4
|
+
import { indexMetadataOf, writeCheckpointSegments, writeLiveVectors, commitCheckpointManifest, decodeSegmentManifest, SINGLE_NODE_PRIMARY_TERM, partitionContentsOf, unpackIndexSnapshotEnvelope, loadSegmentedCheckpoint, writeMetadataEnvelope, openManifestPayload, listedKeysOf, decodeManifestPayload, readVectorFile, readGraphParts, documentsOfPayloadV2, deserializePayloadV1 } from './chunk-7IQR3SZO.mjs';
|
|
5
|
+
import './chunk-HJBJBH26.mjs';
|
|
6
|
+
import './chunk-KOCTCUXW.mjs';
|
|
7
|
+
import { decodeVectorIndexParts, vectorsToBytes, VECTOR_FILE_PAYLOAD_VERSION, bytesToVectors } from './chunk-VGUWIZFQ.mjs';
|
|
7
8
|
import './chunk-LRGWK367.mjs';
|
|
8
|
-
import { DEFAULT_COMPACTION_THRESHOLD, manifestKey, manifestFileRefs, encodeSegmentManifest, readSegmentFile } from './chunk-
|
|
9
|
-
import './chunk-
|
|
10
|
-
import { encodeIndexConfiguration, hasNrslMagic, HEADER_SIZE, readHeader, ARRAY_POSITION_GAP, validatePatternValueLimit, requireSurfaceFormsForPartialFields, validateRequiredFieldsInSchema, validateEmbeddingConfig, storedArrayPositionGap, prepareStoredSynonyms, loadVectorCodeFor, decodeEveryStoredDocument, isCompositePartition, arrayPositionsAreStale, insertDocumentVectors, decodeIndexConfiguration } from './chunk-
|
|
9
|
+
import { DEFAULT_COMPACTION_THRESHOLD, manifestKey, manifestFileRefs, encodeSegmentManifest, readSegmentFile } from './chunk-FS7BYE23.mjs';
|
|
10
|
+
import './chunk-CLE3LZ77.mjs';
|
|
11
|
+
import { encodeIndexConfiguration, hasNrslMagic, HEADER_SIZE, readHeader, ARRAY_POSITION_GAP, validatePatternValueLimit, requireSurfaceFormsForPartialFields, validateRequiredFieldsInSchema, validateEmbeddingConfig, storedArrayPositionGap, prepareStoredSynonyms, loadVectorCodeFor, decodeEveryStoredDocument, isCompositePartition, arrayPositionsAreStale, insertDocumentVectors, decodeIndexConfiguration } from './chunk-IDFMNRIC.mjs';
|
|
11
12
|
import './chunk-LQAKO5QV.mjs';
|
|
12
13
|
import './chunk-NNE4VDMM.mjs';
|
|
13
14
|
import './chunk-L4M7QJNP.mjs';
|
|
@@ -570,7 +571,7 @@ async function validateStagedCheckpoint(store, manifest) {
|
|
|
570
571
|
for (const ref of partition.segments) {
|
|
571
572
|
const { directory } = store;
|
|
572
573
|
if (directory !== void 0) {
|
|
573
|
-
const { checkPagedSegmentFully, isPagedSegmentFile } = await import('./module-
|
|
574
|
+
const { checkPagedSegmentFully, isPagedSegmentFile } = await import('./module-FHJ2GOBI.mjs');
|
|
574
575
|
if (await isPagedSegmentFile(directory, ref.key)) {
|
|
575
576
|
requireSchemaOfManifest(ref.key, await checkPagedSegmentFully(directory, ref), manifest);
|
|
576
577
|
continue;
|
|
@@ -938,7 +939,7 @@ async function stageArchive(indexName, reader, staging, deps) {
|
|
|
938
939
|
if (manifest === null) missingPart("manifest");
|
|
939
940
|
const { directory } = staging;
|
|
940
941
|
if (keepsTextOnDisk(prepared, staging) && directory !== void 0) {
|
|
941
|
-
const { bytesThatSegmentsHoldInMemory } = await import('./module-
|
|
942
|
+
const { bytesThatSegmentsHoldInMemory } = await import('./module-FHJ2GOBI.mjs');
|
|
942
943
|
const replacesIndex = deps.indexRegistry.has(indexName);
|
|
943
944
|
const segmentBytes = await bytesThatSegmentsHoldInMemory(directory, manifest);
|
|
944
945
|
requireRestoreMemory(indexName, archiveFootprint(prepared, manifest, replacesIndex, segmentBytes), replacesIndex);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { DOCUMENT_EXPORT_VERSION, DOCUMENT_EXPORT_FORMAT } from './chunk-
|
|
1
|
+
import { DOCUMENT_EXPORT_VERSION, DOCUMENT_EXPORT_FORMAT } from './chunk-UCJU6WNH.mjs';
|
|
2
2
|
import './chunk-QC4ZRBSX.mjs';
|
|
3
|
-
import { decodeVectorFilePayload, isDead, bytesToVectors } from './chunk-
|
|
3
|
+
import { decodeVectorFilePayload, isDead, bytesToVectors } from './chunk-VGUWIZFQ.mjs';
|
|
4
4
|
import { encodeExactJson, encodeDocumentJson } from './chunk-R4OPUZQ5.mjs';
|
|
5
5
|
import './chunk-BRNAVOKP.mjs';
|
|
6
|
-
import { setNestedValue, KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment } from './chunk-
|
|
7
|
-
import { decodeStoredDocument, openChecksummedEnvelope } from './chunk-
|
|
6
|
+
import { setNestedValue, KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment } from './chunk-CLE3LZ77.mjs';
|
|
7
|
+
import { decodeStoredDocument, openChecksummedEnvelope } from './chunk-IDFMNRIC.mjs';
|
|
8
8
|
import './chunk-LQAKO5QV.mjs';
|
|
9
9
|
import './chunk-NNE4VDMM.mjs';
|
|
10
10
|
import './chunk-L4M7QJNP.mjs';
|
|
@@ -104,7 +104,7 @@ async function wholeFileVectorReads(checkpoint) {
|
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
106
|
async function* pagedDocumentLines(checkpoint) {
|
|
107
|
-
const { openFileVectorReads, pagedPartitionLines } = await import('./module-
|
|
107
|
+
const { openFileVectorReads, pagedPartitionLines } = await import('./module-FHJ2GOBI.mjs');
|
|
108
108
|
const vectors = await openFileVectorReads(checkpoint, () => wholeFileVectorReads(checkpoint));
|
|
109
109
|
try {
|
|
110
110
|
for (const partition of checkpoint.manifest.partitions) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { abandonChangeOf } from './chunk-
|
|
1
|
+
import { abandonChangeOf } from './chunk-NITCPDFL.mjs';
|
|
2
2
|
|
|
3
3
|
// src/narsil/restore-queue.ts
|
|
4
4
|
function restoreDepsOf(core, host) {
|
|
@@ -24,7 +24,7 @@ function restoreDepsOf(core, host) {
|
|
|
24
24
|
function queueRestore(core, host, restoresInFlight, indexName, data) {
|
|
25
25
|
const previous = restoresInFlight.get(indexName) ?? Promise.resolve();
|
|
26
26
|
const restored = previous.then(async () => {
|
|
27
|
-
const { restoreFromSnapshot } = await import('./snapshot-
|
|
27
|
+
const { restoreFromSnapshot } = await import('./snapshot-WMX6JCLP.mjs');
|
|
28
28
|
await restoreFromSnapshot(indexName, data, restoreDepsOf(core, host));
|
|
29
29
|
});
|
|
30
30
|
const settled = restored.then(
|
package/dist/server.mjs
CHANGED
|
@@ -2,15 +2,15 @@ import { answerRequest } from './chunk-B2FTZNNF.mjs';
|
|
|
2
2
|
import { DEFAULT_MAX_RETAINED_TASKS, loadUWebSockets, resolveCors, authorizerFor, createSharedGateBuffer, gateSlotOfWorker, createBodyBudgetBuffer, createRouteRunner, corsHeaderReader, createSharedBodyBudget, MAIN_THREAD_GATE_SLOT, createSharedRequestGate, registerServerRoutes, DEFAULT_MAX_CONCURRENT_TASKS, DEFAULT_MAX_TASK_PAGE_SIZE, DEFAULT_MAX_IMPORT_ERRORS, DEFAULT_MAX_FETCH_DOCUMENTS, DEFAULT_MAX_RESULT_WINDOW, DEFAULT_MAX_CONCURRENT_REQUESTS, DEFAULT_IMPORT_BATCH_SIZE, DEFAULT_MAX_LINE_BYTES, DEFAULT_MAX_RESTORE_BYTES, DEFAULT_MAX_IMPORT_BYTES, DEFAULT_MAX_BODY_BYTES, DEFAULT_MAX_RERANK_WINDOW, DEFAULT_MAX_BODY_BYTES_IN_FLIGHT_FRACTION, RUNNING_TASK_TTL_MS, DEFAULT_TASK_PAGE_SIZE, TERMINAL_TASK_TTL_MS, TASK_PROGRESS_WRITE_INTERVAL_MS, serializeNarsilError, createVersionHandler, acceptorOf, MAX_BODY_BYTES_IN_FLIGHT_FRACTION, createDocumentReadHandlers, sendError, respondError, respondJson, sendText, PROMETHEUS_TEXT_CONTENT_TYPE, MAX_INDEX_TOUCH_INTERVAL_MS, INDEX_TOUCH_INTERVALS_PER_IDLE_TIMEOUT, closeEveryThreadAtExit, REQUEST_THREAD_CLOSE_AT_EXIT_MS, clearGateSlot, clearBodyBudgetSlot, createCloseAtExitWords, createDepartureWord, departureConfirmed, parseJson, validateCreateIndex, rejectInvalid, isRemoveOnlyBatch, validateBatch, serializeBatchResult, parseWriteJson, validateDocumentBody, validateSuggest, validateQuery, refuseRegex, withServerRerankWindow, respondAnswer, parseTaskListQuery, parseJsonOptional, validateChangeAnalysis, validateRebalance, badRequest, sendStream, SNAPSHOT_ARCHIVE_CONTENT_TYPE, DOCUMENT_EXPORT_CONTENT_TYPE, parseRefusalOf, IMPORT_FLUSHES_IN_FLIGHT, confirmDeparture, SERVER_CAPABILITIES, toHttpError, MIN_UNBOUNDED_SERVER_LIMIT, MIN_COUNTED_SERVER_LIMIT } from './chunk-5WB2A3XU.mjs';
|
|
3
3
|
export { ASYNC_IMPORT_CAPABILITY, BM25_TUNING_CAPABILITY, CHANGE_ANALYSIS_CAPABILITY, DOCUMENT_EXPORT_CAPABILITY, INDEX_LIFECYCLE_CAPABILITY, REBUILD_ANALYSIS_CAPABILITY, SERVER_CAPABILITIES, SYNONYMS_CAPABILITY, TASK_CANCEL_CAPABILITY, TASK_FILTER_CAPABILITY, httpStatusForNarsilError } from './chunk-5WB2A3XU.mjs';
|
|
4
4
|
import { rerankOnHost } from './chunk-YGQOPB2Z.mjs';
|
|
5
|
-
import { writeBlockLookupOf, indexReadsOf, validateBackupName, readRestorePlacement } from './chunk-
|
|
5
|
+
import { writeBlockLookupOf, indexReadsOf, validateBackupName, readRestorePlacement } from './chunk-52QQWEBS.mjs';
|
|
6
6
|
import './chunk-LDGGR7YT.mjs';
|
|
7
|
-
import { isRecord, validateIndexName } from './chunk-
|
|
7
|
+
import { isRecord, validateIndexName } from './chunk-3E4RRF5J.mjs';
|
|
8
8
|
import './chunk-IRWP524D.mjs';
|
|
9
9
|
import './chunk-DJHHF2L5.mjs';
|
|
10
10
|
import './chunk-JDDXV6UF.mjs';
|
|
11
|
-
import { rerankWindowCapOf, engineCoreOf, providedDocId, resolveVectorText } from './chunk-
|
|
11
|
+
import { rerankWindowCapOf, engineCoreOf, providedDocId, resolveVectorText } from './chunk-2PNYKG2D.mjs';
|
|
12
12
|
import { readMemoryFigures } from './chunk-6F6USYII.mjs';
|
|
13
|
-
import './chunk-
|
|
13
|
+
import './chunk-UGVUW27S.mjs';
|
|
14
14
|
import './chunk-3HV7M5OJ.mjs';
|
|
15
15
|
import './chunk-KAKQ74LS.mjs';
|
|
16
16
|
import { MAX_RERANK_WINDOW } from './chunk-HJSN7UYG.mjs';
|
|
@@ -23,7 +23,7 @@ import './chunk-2HJWQPR6.mjs';
|
|
|
23
23
|
import './chunk-X5CV2E2B.mjs';
|
|
24
24
|
import './chunk-TGP5M5R7.mjs';
|
|
25
25
|
import './chunk-U2BKYEC7.mjs';
|
|
26
|
-
import './chunk-
|
|
26
|
+
import './chunk-DGRM4EZZ.mjs';
|
|
27
27
|
import './chunk-QHPYS427.mjs';
|
|
28
28
|
import { startIdleHeapCleanup } from './chunk-QYRNLLLI.mjs';
|
|
29
29
|
import './chunk-ZXNQEW43.mjs';
|
|
@@ -1,26 +1,28 @@
|
|
|
1
|
-
import { documentsOfPayloadV2 } from './chunk-
|
|
2
|
-
import { buildArchiveFromMemory, archiveStream, memoryCheckpointStore, readSnapshotArchive, writeArchiveFile } from './chunk-
|
|
1
|
+
import { documentsOfPayloadV2 } from './chunk-FNBNZCGP.mjs';
|
|
2
|
+
import { buildArchiveFromMemory, archiveStream, memoryCheckpointStore, readSnapshotArchive, writeArchiveFile } from './chunk-ZHAXP7SD.mjs';
|
|
3
3
|
import { createByteReader } from './chunk-CZQ33DLW.mjs';
|
|
4
4
|
import { MAX_SNAPSHOT_ANALYSIS_ATTEMPTS, requireRestoreMemory, earlierSnapshotFootprint, storedBytesOfSegments, archiveFootprint } from './chunk-VP6XRMWR.mjs';
|
|
5
|
-
import { indexMetadataOf, unpackIndexSnapshotEnvelope, loadSegmentedCheckpoint, writeMetadataEnvelope, deserializePayloadV1, SINGLE_NODE_PRIMARY_TERM } from './chunk-
|
|
6
|
-
import { readVectorFile, readGraphParts } from './chunk-
|
|
5
|
+
import { indexMetadataOf, unpackIndexSnapshotEnvelope, loadSegmentedCheckpoint, writeMetadataEnvelope, deserializePayloadV1, SINGLE_NODE_PRIMARY_TERM } from './chunk-ZS6CMXAE.mjs';
|
|
6
|
+
import { readVectorFile, readGraphParts } from './chunk-6RKSY3BX.mjs';
|
|
7
7
|
import { restoredConfigFields, restoredEmbedding, rejectSnapshot } from './chunk-IRWP524D.mjs';
|
|
8
8
|
import './chunk-ZXNNR73R.mjs';
|
|
9
|
-
import './chunk-
|
|
10
|
-
import './chunk-
|
|
11
|
-
import
|
|
9
|
+
import './chunk-DMNPYF54.mjs';
|
|
10
|
+
import './chunk-IJSFWGVW.mjs';
|
|
11
|
+
import './chunk-MATMVH65.mjs';
|
|
12
|
+
import './chunk-VD7J552I.mjs';
|
|
13
|
+
import { decodeVectorIndexParts, bytesToVectors } from './chunk-G5KHSM6E.mjs';
|
|
12
14
|
import './chunk-AWNHDBKV.mjs';
|
|
13
15
|
import './chunk-37CD3OKS.mjs';
|
|
14
16
|
import './chunk-DJHHF2L5.mjs';
|
|
15
|
-
import './chunk-
|
|
17
|
+
import './chunk-KQJVNPRM.mjs';
|
|
16
18
|
import './chunk-JDDXV6UF.mjs';
|
|
17
|
-
import { readSegmentFile } from './chunk-
|
|
18
|
-
import './chunk-
|
|
19
|
-
import { manifestKey, encodeSegmentManifest, manifestFileRefs } from './chunk-
|
|
19
|
+
import { readSegmentFile } from './chunk-CSHHU7PA.mjs';
|
|
20
|
+
import './chunk-NPXVQS33.mjs';
|
|
21
|
+
import { manifestKey, encodeSegmentManifest, manifestFileRefs } from './chunk-7LDMWKP6.mjs';
|
|
20
22
|
import './chunk-5QMHMELB.mjs';
|
|
21
|
-
import { encodeIndexConfiguration, hasNrslMagic, HEADER_SIZE, readHeader, validateRequiredFieldsInSchema, validateEmbeddingConfig, storedArrayPositionGap, decodeIndexConfiguration, prepareStoredSynonyms, arrayPositionsAreStale, insertDocumentVectors } from './chunk-
|
|
23
|
+
import { encodeIndexConfiguration, hasNrslMagic, HEADER_SIZE, readHeader, validateRequiredFieldsInSchema, validateEmbeddingConfig, storedArrayPositionGap, decodeIndexConfiguration, prepareStoredSynonyms, arrayPositionsAreStale, insertDocumentVectors } from './chunk-2PNYKG2D.mjs';
|
|
22
24
|
import { validatePatternValueLimit, requireSurfaceFormsForPartialFields } from './chunk-6F6USYII.mjs';
|
|
23
|
-
import { decodeEveryStoredDocument } from './chunk-
|
|
25
|
+
import { decodeEveryStoredDocument } from './chunk-UGVUW27S.mjs';
|
|
24
26
|
import { ARRAY_POSITION_GAP, isCompositePartition } from './chunk-3HV7M5OJ.mjs';
|
|
25
27
|
import './chunk-KAKQ74LS.mjs';
|
|
26
28
|
import './chunk-HJSN7UYG.mjs';
|
|
@@ -33,7 +35,7 @@ import { getLanguage, resolveIndexAnalysis } from './chunk-2HJWQPR6.mjs';
|
|
|
33
35
|
import './chunk-X5CV2E2B.mjs';
|
|
34
36
|
import './chunk-TGP5M5R7.mjs';
|
|
35
37
|
import './chunk-U2BKYEC7.mjs';
|
|
36
|
-
import { loadVectorCodeFor } from './chunk-
|
|
38
|
+
import { loadVectorCodeFor } from './chunk-DGRM4EZZ.mjs';
|
|
37
39
|
import './chunk-QHPYS427.mjs';
|
|
38
40
|
import './chunk-QYRNLLLI.mjs';
|
|
39
41
|
import './chunk-ZXNQEW43.mjs';
|
|
@@ -82,7 +84,7 @@ async function validateStagedCheckpoint(store, manifest) {
|
|
|
82
84
|
for (const ref of partition.segments) {
|
|
83
85
|
const { directory } = store;
|
|
84
86
|
if (directory !== void 0) {
|
|
85
|
-
const { checkPagedSegmentFully, isPagedSegmentFile } = await import('./module-
|
|
87
|
+
const { checkPagedSegmentFully, isPagedSegmentFile } = await import('./module-6RLIKSZQ.mjs');
|
|
86
88
|
if (await isPagedSegmentFile(directory, ref.key)) {
|
|
87
89
|
requireSchemaOfManifest(ref.key, await checkPagedSegmentFully(directory, ref), manifest);
|
|
88
90
|
continue;
|
|
@@ -450,7 +452,7 @@ async function stageArchive(indexName, reader, staging, deps) {
|
|
|
450
452
|
if (manifest === null) missingPart("manifest");
|
|
451
453
|
const { directory } = staging;
|
|
452
454
|
if (keepsTextOnDisk(prepared, staging) && directory !== void 0) {
|
|
453
|
-
const { bytesThatSegmentsHoldInMemory } = await import('./module-
|
|
455
|
+
const { bytesThatSegmentsHoldInMemory } = await import('./module-6RLIKSZQ.mjs');
|
|
454
456
|
const replacesIndex = deps.indexRegistry.has(indexName);
|
|
455
457
|
const segmentBytes = await bytesThatSegmentsHoldInMemory(directory, manifest);
|
|
456
458
|
requireRestoreMemory(indexName, archiveFootprint(prepared, manifest, replacesIndex, segmentBytes), replacesIndex);
|
package/dist/workers/entry.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { loadVectorCode } from '../chunk-
|
|
1
|
+
import { loadVectorCode } from '../chunk-DGRM4EZZ.mjs';
|
|
2
2
|
import { isValidWorkerAction } from '../chunk-QHPYS427.mjs';
|
|
3
3
|
import { startIdleHeapCleanup } from '../chunk-QYRNLLLI.mjs';
|
|
4
4
|
import '../chunk-ZXNQEW43.mjs';
|
|
@@ -118,7 +118,7 @@ async function setup() {
|
|
|
118
118
|
} catch {
|
|
119
119
|
parentPort = null;
|
|
120
120
|
}
|
|
121
|
-
const [{ createDirectExecutor }] = await Promise.all([import('../direct-executor-
|
|
121
|
+
const [{ createDirectExecutor }] = await Promise.all([import('../direct-executor-WYALQSMD.mjs'), loadVectorCode()]);
|
|
122
122
|
const handleAction = createActionHandler(createDirectExecutor({ threadSlot }));
|
|
123
123
|
if (parentPort) {
|
|
124
124
|
const port = parentPort;
|