@delali/narsil 0.3.1-next.144 → 0.3.1-next.145
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/adapters/filesystem.d.ts +1 -1
- package/dist/adapters/filesystem.mjs +101 -13
- package/dist/adapters/gcs.d.ts +49 -0
- package/dist/adapters/gcs.mjs +213 -0
- package/dist/adapters/indexeddb.d.ts +1 -1
- package/dist/adapters/indexeddb.mjs +2 -7
- package/dist/adapters/memory.d.ts +1 -1
- package/dist/adapters/memory.mjs +5 -0
- package/dist/adapters/s3.d.ts +53 -0
- package/dist/adapters/s3.mjs +263 -0
- package/dist/{adapters-BQFQ4PRz.d.ts → adapters-pljAqmrC.d.ts} +33 -0
- package/dist/{analysis-change-HQUT2Z3I.mjs → analysis-change-D5APH4Z3.mjs} +24 -33
- package/dist/{browser/analysis-change-entry-7HR4LWL3.mjs → analysis-change-entry-V4SQQSXQ.mjs} +1 -1
- package/dist/browser/{analysis-change-JPV775LR.mjs → analysis-change-QTCQ5ETU.mjs} +5 -5
- package/dist/{analysis-change-entry-TZTG4AZB.mjs → browser/analysis-change-entry-KYEQSP3I.mjs} +1 -1
- package/dist/{chunk-46NZOPHS.mjs → browser/chunk-5WYWLTM5.mjs} +2 -2
- package/dist/browser/{chunk-ZEV26AQ6.mjs → chunk-6OFS7RUN.mjs} +1 -1
- package/dist/browser/{chunk-MZI3TEOW.mjs → chunk-75PMIFQA.mjs} +1 -1
- package/dist/browser/{chunk-R4WUDZQV.mjs → chunk-AOKLYVTT.mjs} +2 -2
- package/dist/browser/{chunk-LVY2LI35.mjs → chunk-BTMRV5MY.mjs} +2 -2
- package/dist/browser/{chunk-3ZBJYAS4.mjs → chunk-FHO5N7FD.mjs} +1 -1
- package/dist/browser/{chunk-KTOK275N.mjs → chunk-FXPMF65P.mjs} +12 -12
- package/dist/browser/{chunk-VFYMPCOV.mjs → chunk-GP4QLUQM.mjs} +5 -5
- package/dist/browser/{chunk-35B42UFM.mjs → chunk-IFGTRRPU.mjs} +9 -0
- package/dist/browser/{chunk-6RHTAVZX.mjs → chunk-K7UFXEJS.mjs} +31 -14
- package/dist/browser/{chunk-MVM33ZUL.mjs → chunk-LGJ6XMH5.mjs} +5 -5
- package/dist/{chunk-NN33CZRE.mjs → browser/chunk-PMBSBSCN.mjs} +2 -2
- package/dist/browser/{chunk-D33A5VMU.mjs → chunk-QNDWMPV2.mjs} +1 -1
- package/dist/browser/{chunk-HKX2G6WH.mjs → chunk-U77XQJOY.mjs} +3 -3
- package/dist/browser/{chunk-TCLEOZ4P.mjs → chunk-XIHLIMFX.mjs} +2 -2
- package/dist/browser/{chunk-WCFCHIBB.mjs → chunk-XWMEGKDC.mjs} +2 -2
- package/dist/browser/{chunk-5DB2VDGI.mjs → chunk-ZALEKEUH.mjs} +27 -27
- package/dist/browser/{chunk-MWUK3DA5.mjs → chunk-ZKVDQ5ZH.mjs} +8 -8
- package/dist/browser/{cold-module-MJMKNUYJ.mjs → cold-module-Y2IJAP7S.mjs} +14 -14
- package/dist/browser/{durability-wiring-SNOWIT6Z.mjs → durability-wiring-MLXZ5QQF.mjs} +78 -61
- package/dist/browser/import-FTMLTPGQ.mjs +9 -0
- package/dist/browser/{module-BUFNZMEU.mjs → module-5LMDGXQH.mjs} +10 -10
- package/dist/browser/{module-BVP4TKZU.mjs → module-Q6VFGLMG.mjs} +71 -11
- package/dist/browser/{phrase-module-HGVBO24W.mjs → phrase-module-KXNRTWCS.mjs} +1 -1
- package/dist/{restore-queue-FEYAC4SB.mjs → browser/restore-queue-SOAHKZSQ.mjs} +2 -2
- package/dist/browser/{runtime-VEUH674B.mjs → runtime-ZNEGK33G.mjs} +2 -2
- package/dist/browser/{snapshot-QXBKHJAG.mjs → snapshot-2EGS2FYU.mjs} +16 -15
- package/dist/browser/{write-WHFBDWQS.mjs → write-WMZA6NSF.mjs} +11 -11
- package/dist/{capabilities-BCdUwK_L.d.ts → capabilities-CNnzGtqP.d.ts} +3 -3
- package/dist/{chunk-ZMBFWQXN.mjs → chunk-2E2ZFOPT.mjs} +2 -2
- package/dist/{chunk-BOJZGUS6.mjs → chunk-5K2JHKM3.mjs} +1 -1
- package/dist/{chunk-YH5OIL7B.mjs → chunk-5QMHMELB.mjs} +6 -1
- package/dist/{browser/chunk-CCOAOO73.mjs → chunk-6FOJKNUR.mjs} +2 -2
- package/dist/{chunk-GLZHNSGB.mjs → chunk-6Z22L5RN.mjs} +1 -1
- package/dist/{chunk-AST3SHFA.mjs → chunk-7523VCM4.mjs} +2 -2
- package/dist/{chunk-KZL72VTC.mjs → chunk-7AJAW6NN.mjs} +11 -10
- package/dist/{chunk-DQNKVOJ2.mjs → chunk-BTARFTEN.mjs} +695 -8
- package/dist/{chunk-YLNSJQLX.mjs → chunk-DHEJAGVW.mjs} +5 -5
- package/dist/{chunk-Z4HFMYNX.mjs → chunk-DKMZ7JFW.mjs} +29 -12
- package/dist/{chunk-NRUXBYPH.mjs → chunk-F442VZUL.mjs} +5 -5
- package/dist/{chunk-O4LJQI4G.mjs → chunk-FRJ5RGX7.mjs} +126 -4
- package/dist/{chunk-L76W3IZJ.mjs → chunk-FTQLF5JI.mjs} +1 -1
- package/dist/{chunk-UIKN2OTQ.mjs → chunk-G6Q5DEF5.mjs} +37 -3
- package/dist/{chunk-DD2673TX.mjs → chunk-GRFXSEFF.mjs} +2 -2
- package/dist/{chunk-ZSWHPKGM.mjs → chunk-GVPYMSLO.mjs} +69 -2
- package/dist/{chunk-VEFN6X6Q.mjs → chunk-HOC5JP2H.mjs} +9 -10
- package/dist/{chunk-SRJBFG2T.mjs → chunk-HTMUGEFU.mjs} +6 -7
- package/dist/{chunk-J6YVB2XM.mjs → chunk-IJPK5PGM.mjs} +1 -1
- package/dist/{chunk-HNHCNTVG.mjs → chunk-IQHZMCLX.mjs} +9 -0
- package/dist/{chunk-C3YDYX6C.mjs → chunk-ISUOSACK.mjs} +1 -1
- package/dist/{chunk-YHUTF6EA.mjs → chunk-IV2XTSS2.mjs} +14 -14
- package/dist/chunk-K5HSUPYS.mjs +11 -0
- package/dist/{chunk-LA4WNDHL.mjs → chunk-KG5N7LE6.mjs} +12 -14
- package/dist/{chunk-NPNK57CA.mjs → chunk-LWFK3TC2.mjs} +1 -1
- package/dist/{chunk-RKAVHNRW.mjs → chunk-LYKUJNAV.mjs} +10 -5
- package/dist/{chunk-TNBIK2LQ.mjs → chunk-MJTEU2XK.mjs} +3 -4
- package/dist/chunk-NWTEJ2T7.mjs +100 -0
- package/dist/{chunk-WJGO5PGV.mjs → chunk-OH7SX5MY.mjs} +28 -16
- package/dist/{chunk-W2COJ5AH.mjs → chunk-ONDEEBTA.mjs} +2 -2
- package/dist/{chunk-PWIWSUCX.mjs → chunk-POUYICOU.mjs} +1 -1
- package/dist/chunk-PRID7CA6.mjs +104 -0
- package/dist/{chunk-ICW45TTU.mjs → chunk-QLDLQW36.mjs} +1 -1
- package/dist/{chunk-KEIYVZUX.mjs → chunk-QU2XF7VI.mjs} +3 -4
- package/dist/{chunk-74XB2SXI.mjs → chunk-QXH2CS4V.mjs} +35 -2
- package/dist/{chunk-ZPWS2SKJ.mjs → chunk-QYMAYU7M.mjs} +165 -11
- package/dist/{chunk-NJJCPFXN.mjs → chunk-RNUP6WZ6.mjs} +2 -2
- package/dist/{chunk-SBMAWTRG.mjs → chunk-RTVAWNUL.mjs} +80 -14
- package/dist/{chunk-7AUASRE7.mjs → chunk-RVBUQITB.mjs} +7 -7
- package/dist/{chunk-VJEGOELZ.mjs → chunk-SA52N7G3.mjs} +3 -3
- package/dist/{chunk-NOT5QOHU.mjs → chunk-SE7MKJVK.mjs} +1 -1
- package/dist/{chunk-BRUUBXCB.mjs → chunk-SNB4DYL3.mjs} +10 -38
- package/dist/chunk-SVO6NV4D.mjs +248 -0
- package/dist/{chunk-GWOS5DYC.mjs → chunk-UGQULMSU.mjs} +11 -13
- package/dist/{chunk-6SNBQESJ.mjs → chunk-UHVTEVF5.mjs} +5 -5
- package/dist/{chunk-HJJWY6PT.mjs → chunk-UQS5PAS5.mjs} +1 -1
- package/dist/{chunk-UUZCQQG2.mjs → chunk-W6M4RRAT.mjs} +3 -3
- package/dist/{browser/chunk-XNWPP5NS.mjs → chunk-WDEWU46C.mjs} +2 -2
- package/dist/{chunk-XZ3SRNDJ.mjs → chunk-WMIV7PJ7.mjs} +65 -5
- package/dist/{chunk-RHKRTYGO.mjs → chunk-X5SBWARI.mjs} +3 -3
- package/dist/{chunk-XS2VM7UE.mjs → chunk-XLAI4OIO.mjs} +2 -2
- package/dist/{chunk-IO5F7ZBE.mjs → chunk-YUCGFPMS.mjs} +454 -37
- package/dist/{client-B12YFALP.d.ts → client-DoYPHcUn.d.ts} +62 -5
- package/dist/client.d.ts +8 -8
- package/dist/client.mjs +44 -0
- package/dist/{cold-module-4X7WJCFM.mjs → cold-module-NUD332YD.mjs} +32 -41
- package/dist/{config-CIG5yDyg.d.ts → config-CuUfls_H.d.ts} +150 -3
- package/dist/{config-BhZxIeb1.d.ts → config-Dzs46im6.d.ts} +11 -2
- package/dist/direct-executor-FDQYQEJQ.mjs +22 -0
- package/dist/distribution/coordinator/etcd.d.ts +3 -3
- package/dist/distribution/coordinator/etcd.mjs +1 -1
- package/dist/distribution/coordinator/in-memory.d.ts +3 -3
- package/dist/distribution/transport/grpc.mjs +4 -4
- package/dist/distribution/transport/in-memory.mjs +2 -2
- package/dist/distribution/transport/tcp.mjs +3 -3
- package/dist/distribution.d.ts +8 -8
- package/dist/distribution.mjs +16219 -14535
- package/dist/{durability-wiring-324D2DDD.mjs → durability-wiring-K7RDXWL6.mjs} +103 -95
- package/dist/embeddings/openai.d.ts +1 -1
- package/dist/embeddings/openai.mjs +2 -2
- package/dist/{engine-CtzbHOmG.d.ts → engine-C0ifUEcm.d.ts} +3 -3
- package/dist/import-6KXFY6XI.mjs +35 -0
- package/dist/{index-DsEurhSl.d.ts → index-MsF7e5hL.d.ts} +2 -2
- package/dist/index.browser.mjs +4 -4
- package/dist/index.d.ts +7 -7
- package/dist/index.mjs +21 -30
- package/dist/invalidation/broadcast-channel.d.ts +1 -1
- package/dist/invalidation/filesystem.d.ts +1 -1
- package/dist/invalidation/filesystem.mjs +1 -1
- package/dist/invalidation/noop.d.ts +1 -1
- package/dist/{long-query-thread-4SW7RWDE.mjs → long-query-thread-FKVHRCHF.mjs} +18 -23
- package/dist/{module-DXSJ5LT2.mjs → module-GJUKW5VU.mjs} +14 -16
- package/dist/{module-IYPLWHGC.mjs → module-TMFIWOD2.mjs} +28 -37
- package/dist/{paged-partition-archive-HFP45PLU.mjs → paged-partition-archive-WNUEMYWM.mjs} +34 -39
- package/dist/partial-words.mjs +7 -9
- package/dist/pattern.mjs +4 -6
- package/dist/persistence/durability/checkpoint-worker.d.ts +2 -2
- package/dist/persistence/durability/checkpoint-worker.mjs +27 -36
- package/dist/{phrase-module-5QHBD2VJ.mjs → phrase-module-OMY3QQV7.mjs} +1 -1
- package/dist/react.d.ts +11 -11
- package/dist/react.mjs +9 -0
- package/dist/{rerank-KTLC3E6N.mjs → rerank-ZZ5CHKLW.mjs} +4 -4
- package/dist/rerankers/http.d.ts +1 -1
- package/dist/rerankers/http.mjs +2 -2
- package/dist/{browser/restore-queue-ONYNYUDE.mjs → restore-queue-UAVGBSJG.mjs} +2 -2
- package/dist/{runtime-DYV75DCB.mjs → runtime-RAOCKSYA.mjs} +5 -5
- package/dist/{schema-B-Runv0n.d.ts → schema-D33CyXCy.d.ts} +1 -1
- package/dist/server.d.ts +24 -12
- package/dist/server.mjs +153 -36
- package/dist/{snapshot-CGM65VCD.mjs → snapshot-DB5ZVCDN.mjs} +39 -48
- package/dist/synonyms.mjs +3 -4
- package/dist/{tasks-CjRJRGTb.d.ts → tasks-ChWp0wrF.d.ts} +59 -7
- package/dist/{thread-KGNAIKPD.mjs → thread-OV6T555H.mjs} +17 -22
- package/dist/vector/search-worker.d.ts +2 -2
- package/dist/vector/search-worker.mjs +5 -6
- package/dist/workers/entry.mjs +7 -7
- package/dist/{write-2DZPEQL2.mjs → write-KZVTLGCI.mjs} +28 -37
- package/openapi.json +349 -2
- package/package.json +27 -8
- package/dist/browser/import-TLB2A5LJ.mjs +0 -9
- package/dist/chunk-5WYVUPGD.mjs +0 -427
- package/dist/chunk-AV4IJKD2.mjs +0 -35
- package/dist/chunk-GES7U2PM.mjs +0 -68
- package/dist/chunk-KGOXHLLZ.mjs +0 -693
- package/dist/chunk-N37VMC62.mjs +0 -18
- package/dist/chunk-QSK35UC2.mjs +0 -35
- package/dist/chunk-WNBRW4Q2.mjs +0 -128
- package/dist/chunk-WQBCBKY3.mjs +0 -8
- package/dist/chunk-ZATRDAYU.mjs +0 -160
- package/dist/direct-executor-7XOQ7VQP.mjs +0 -28
- package/dist/import-OOBUW3RR.mjs +0 -44
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { decodeSegmentManifest, metadataFromConfig, SINGLE_NODE_PRIMARY_TERM, readMetadataEnvelope, createSeqOwner, readSegmentManifest,
|
|
2
|
-
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, DIRECTORY_LOCK_SETTLE_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-
|
|
3
|
-
import { applyDeleteEntry, applyIndexEntry } from './chunk-
|
|
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, SEGMENT_HEADER_SIZE, documentsOfPayloadV2, readCommitMarker, nextMarkerSlot, encodeMarkerSlot, markerSlotOffset, metadataConfigOf, durableMetadataConfigOf, buildEntry, readCurrentManifest, captureWholePartition } from './chunk-FXPMF65P.mjs';
|
|
2
|
+
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, DIRECTORY_LOCK_SETTLE_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-LGJ6XMH5.mjs';
|
|
3
|
+
import { applyDeleteEntry, applyIndexEntry } from './chunk-XIHLIMFX.mjs';
|
|
4
4
|
import { nodeThreadId, spawnNodeWorker } from './chunk-HOZW3PKP.mjs';
|
|
5
|
-
import { decodeVectorIndexParts, VECTOR_FILE_MAX_VECTORS, deadBytesFor, countDead, decodeVectorFilePayload, decodeVectorGraphPayload, graphPartsOfEarlierPayload } from './chunk-
|
|
6
|
-
import { encodeDocument, fnv1a, requireValidFieldTypes, openChecksummedEnvelope, HEADER_SIZE, buildSegmentPayload, resolvePartitionInsertOptions, freezeSegmentShared, createSharedFrozenSegment, createRequestId } from './chunk-
|
|
5
|
+
import { decodeVectorIndexParts, VECTOR_FILE_MAX_VECTORS, deadBytesFor, countDead, decodeVectorFilePayload, decodeVectorGraphPayload, graphPartsOfEarlierPayload } from './chunk-BTMRV5MY.mjs';
|
|
6
|
+
import { encodeDocument, toError, fnv1a, requireValidFieldTypes, openChecksummedEnvelope, HEADER_SIZE, buildSegmentPayload, resolvePartitionInsertOptions, freezeSegmentShared, createSharedFrozenSegment, createRequestId } from './chunk-ZALEKEUH.mjs';
|
|
7
7
|
import './chunk-JPTQZWJQ.mjs';
|
|
8
8
|
import './chunk-26A5JFT2.mjs';
|
|
9
|
-
import { compareCodePoints, MIN_M, MAX_FILE_BYTES, detectRuntime, resolveWorkerEntry } from './chunk-
|
|
10
|
-
import { MAX_INDEX_NAME_LENGTH, INDEX_NAME_PATTERN } from './chunk-
|
|
11
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
9
|
+
import { compareCodePoints, MIN_M, MAX_FILE_BYTES, detectRuntime, resolveWorkerEntry } from './chunk-QNDWMPV2.mjs';
|
|
10
|
+
import { MAX_INDEX_NAME_LENGTH, INDEX_NAME_PATTERN } from './chunk-75PMIFQA.mjs';
|
|
11
|
+
import { NarsilError, ErrorCodes } from './chunk-IFGTRRPU.mjs';
|
|
12
12
|
import { decode } from '@msgpack/msgpack';
|
|
13
13
|
|
|
14
14
|
// src/persistence/durability/node-fs.browser.ts
|
|
@@ -825,7 +825,7 @@ function recoverDirectoryRestores(directory) {
|
|
|
825
825
|
}
|
|
826
826
|
|
|
827
827
|
// src/persistence/durability/restore-staging.ts
|
|
828
|
-
function
|
|
828
|
+
function toError2(error) {
|
|
829
829
|
return error instanceof Error ? error : new Error(String(error));
|
|
830
830
|
}
|
|
831
831
|
function pathUnder(path, root) {
|
|
@@ -894,7 +894,7 @@ function createRestoreStaging(storage, indexName, options = {}) {
|
|
|
894
894
|
await storage.remove(journalKey(indexName));
|
|
895
895
|
} catch (removal) {
|
|
896
896
|
committed = true;
|
|
897
|
-
options.onStorageLost?.(
|
|
897
|
+
options.onStorageLost?.(toError2(removal));
|
|
898
898
|
}
|
|
899
899
|
throw error;
|
|
900
900
|
}
|
|
@@ -904,7 +904,7 @@ function createRestoreStaging(storage, indexName, options = {}) {
|
|
|
904
904
|
try {
|
|
905
905
|
await (options.finish === void 0 ? finishOnStorage() : options.finish(finishOnStorage));
|
|
906
906
|
} catch (error) {
|
|
907
|
-
options.onStorageLost?.(
|
|
907
|
+
options.onStorageLost?.(toError2(error));
|
|
908
908
|
}
|
|
909
909
|
},
|
|
910
910
|
async removeRetired() {
|
|
@@ -936,7 +936,7 @@ function adapterRestoreStorage(adapter) {
|
|
|
936
936
|
}
|
|
937
937
|
|
|
938
938
|
// src/persistence/durability/archive-checkpoint.ts
|
|
939
|
-
function
|
|
939
|
+
function toError3(error) {
|
|
940
940
|
return error instanceof Error ? error : new Error(String(error));
|
|
941
941
|
}
|
|
942
942
|
function stageDirectoryRestore(deps, indexName) {
|
|
@@ -945,7 +945,7 @@ function stageDirectoryRestore(deps, indexName) {
|
|
|
945
945
|
try {
|
|
946
946
|
await run();
|
|
947
947
|
} catch (error) {
|
|
948
|
-
deps.markFatal(
|
|
948
|
+
deps.markFatal(toError3(error));
|
|
949
949
|
throw error;
|
|
950
950
|
}
|
|
951
951
|
},
|
|
@@ -969,8 +969,8 @@ function createArchiveCheckpointAccess(deps) {
|
|
|
969
969
|
deps.held.set(indexName, (deps.held.get(indexName) ?? 0) + 1);
|
|
970
970
|
const release = releaser(deps.held, indexName);
|
|
971
971
|
try {
|
|
972
|
-
await deps.checkpoint(indexName);
|
|
973
|
-
await deps.checkpoint(indexName);
|
|
972
|
+
await deps.checkpoint(indexName, false);
|
|
973
|
+
await deps.checkpoint(indexName, true);
|
|
974
974
|
const manifestBytes = await deps.directory.read(manifestKey(indexName));
|
|
975
975
|
if (manifestBytes === null) {
|
|
976
976
|
throw new NarsilError(ErrorCodes.PERSISTENCE_SAVE_FAILED, `Index "${indexName}" holds no checkpoint`, {
|
|
@@ -1266,7 +1266,7 @@ function wholePartitionsWhereMostChanged(manager, rules) {
|
|
|
1266
1266
|
return whole;
|
|
1267
1267
|
};
|
|
1268
1268
|
}
|
|
1269
|
-
async function captureCheckpoint(indexState, manager, vectorIndexes, wholePartitionsOf = noWholePartitions, priorCheckpointThatLimitsTheRecords, listedVectorFields = [], termHistoryOf, onCaptured) {
|
|
1269
|
+
async function captureCheckpoint(indexState, manager, vectorIndexes, wholePartitionsOf = noWholePartitions, priorCheckpointThatLimitsTheRecords, listedVectorFields = [], termHistoryOf, onCaptured, pinsRetiredVectors = false) {
|
|
1270
1270
|
for (const vectorIndex of vectorIndexes.values()) await vectorIndex.completeGraph();
|
|
1271
1271
|
return whileNoMutationApplies([...indexState.partitions.values()], () => {
|
|
1272
1272
|
onCaptured?.();
|
|
@@ -1291,14 +1291,19 @@ async function captureCheckpoint(indexState, manager, vectorIndexes, wholePartit
|
|
|
1291
1291
|
targets.push(target);
|
|
1292
1292
|
}
|
|
1293
1293
|
const vectorPlans = /* @__PURE__ */ new Map();
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1294
|
+
try {
|
|
1295
|
+
for (const [fieldPath, vectorIndex] of vectorIndexes) {
|
|
1296
|
+
const listed = listedVectorFields.find((ref) => ref.fieldPath === fieldPath);
|
|
1297
|
+
const listedKeys2 = listed === void 0 ? null : listed.files.map((file) => file.key);
|
|
1298
|
+
vectorPlans.set(fieldPath, vectorIndex.planCheckpoint(listedKeys2, false, pinsRetiredVectors));
|
|
1299
|
+
}
|
|
1300
|
+
const memoryMatchesTheTargets = recordsLeftInLog === 0;
|
|
1301
|
+
const wholePartitions = memoryMatchesTheTargets ? wholePartitionsOf(targets) : noWholePartitions();
|
|
1302
|
+
return { targets, documentCount, vectorPlans, wholePartitions, recordsLeftInLog };
|
|
1303
|
+
} catch (error) {
|
|
1304
|
+
for (const plan of vectorPlans.values()) plan.release();
|
|
1305
|
+
throw error;
|
|
1306
|
+
}
|
|
1302
1307
|
});
|
|
1303
1308
|
}
|
|
1304
1309
|
async function writeCapturedVectors(store, indexName, capture2, priorManifest, rewriteUnchanged) {
|
|
@@ -1646,7 +1651,8 @@ async function writeOneBoundedCheckpoint(input) {
|
|
|
1646
1651
|
writeRecords === null ? void 0 : (partitionId, lastSeqNo) => writeRecords.termHistoryOf(indexName, partitionId, lastSeqNo),
|
|
1647
1652
|
textOnDisk ? () => {
|
|
1648
1653
|
changesSinceCapture = manager.openCheckpointChangeLog();
|
|
1649
|
-
} : void 0
|
|
1654
|
+
} : void 0,
|
|
1655
|
+
input.pinsRetiredVectors
|
|
1650
1656
|
);
|
|
1651
1657
|
try {
|
|
1652
1658
|
await openNewLogSegments(input.indexState, input.failPartition);
|
|
@@ -1654,12 +1660,13 @@ async function writeOneBoundedCheckpoint(input) {
|
|
|
1654
1660
|
return changesSinceCapture;
|
|
1655
1661
|
});
|
|
1656
1662
|
} finally {
|
|
1663
|
+
for (const plan of capture2.vectorPlans.values()) plan.release();
|
|
1657
1664
|
changesSinceCapture?.close();
|
|
1658
1665
|
}
|
|
1659
1666
|
}
|
|
1660
1667
|
async function adoptWrittenSegments(input, manager, partitions, changes) {
|
|
1661
1668
|
const { indexName, indexState, hooks } = input;
|
|
1662
|
-
const { actionPartitionsOf, closeUnusedSegments, prepareDiskAdoption, swapPreparedPartitions } = await import('./module-
|
|
1669
|
+
const { actionPartitionsOf, closeUnusedSegments, prepareDiskAdoption, swapPreparedPartitions } = await import('./module-5LMDGXQH.mjs');
|
|
1663
1670
|
const adoption = await prepareDiskAdoption(input.directory, manager, partitions);
|
|
1664
1671
|
if (adoption === null) return [];
|
|
1665
1672
|
const adopted = await whileNoMutationApplies([...indexState.partitions.values()], () => {
|
|
@@ -1714,7 +1721,7 @@ async function finishBoundedCheckpoint(input, manager, store, metadata, priorMan
|
|
|
1714
1721
|
const droppedThisCheckpoint = changes !== null && capture2.recordsLeftInLog === 0 ? new Set(await adoptWrittenSegments(input, manager, segments.partitions, changes)) : /* @__PURE__ */ new Set();
|
|
1715
1722
|
if (!input.holdsCheckpointFiles()) {
|
|
1716
1723
|
const removable = await garbageThatNoFieldStillReads(store, vectorIndexes, written.garbage);
|
|
1717
|
-
const stillRead = metadata.textStorage === "disk" ? (await import('./module-
|
|
1724
|
+
const stillRead = metadata.textStorage === "disk" ? (await import('./module-5LMDGXQH.mjs')).keysThatSegmentsStillRead(manager) : /* @__PURE__ */ new Set();
|
|
1718
1725
|
await removeCheckpointGarbage(
|
|
1719
1726
|
store,
|
|
1720
1727
|
removable.filter((key) => !droppedThisCheckpoint.has(key) && !stillRead.has(key))
|
|
@@ -1957,8 +1964,28 @@ async function drainIndexStateForUnload(indexState, pendingMetadataWrite, closeW
|
|
|
1957
1964
|
}
|
|
1958
1965
|
}
|
|
1959
1966
|
|
|
1967
|
+
// src/persistence/durability/metadata-write-queue.ts
|
|
1968
|
+
function createMetadataWriteQueue() {
|
|
1969
|
+
const writes = /* @__PURE__ */ new Map();
|
|
1970
|
+
return {
|
|
1971
|
+
queue(indexName, write) {
|
|
1972
|
+
const previous = writes.get(indexName) ?? Promise.resolve();
|
|
1973
|
+
const queued = previous.then(write);
|
|
1974
|
+
writes.set(
|
|
1975
|
+
indexName,
|
|
1976
|
+
queued.catch(() => void 0)
|
|
1977
|
+
);
|
|
1978
|
+
return queued;
|
|
1979
|
+
},
|
|
1980
|
+
pending: (indexName) => writes.get(indexName),
|
|
1981
|
+
forget(indexName) {
|
|
1982
|
+
writes.delete(indexName);
|
|
1983
|
+
}
|
|
1984
|
+
};
|
|
1985
|
+
}
|
|
1986
|
+
|
|
1960
1987
|
// src/persistence/durability/mutation-batch.ts
|
|
1961
|
-
function
|
|
1988
|
+
function toError4(err) {
|
|
1962
1989
|
return err instanceof Error ? err : new Error(String(err));
|
|
1963
1990
|
}
|
|
1964
1991
|
function requireAscendingSeqNo(record, seqNo, previousSeqNo) {
|
|
@@ -1978,7 +2005,7 @@ function failUnlessAlreadyFailed(outcomes, count, error) {
|
|
|
1978
2005
|
}
|
|
1979
2006
|
}
|
|
1980
2007
|
function failPartition(partition, address, deps, err) {
|
|
1981
|
-
const error =
|
|
2008
|
+
const error = toError4(err);
|
|
1982
2009
|
if (partition.failed !== null) return partition.failed;
|
|
1983
2010
|
partition.failed = error;
|
|
1984
2011
|
if (!deps.failsPartitionAlone(address.indexName, address.partitionId, error)) deps.markFatal(error);
|
|
@@ -2090,7 +2117,7 @@ async function recordPartitionBatch(partition, records, deps) {
|
|
|
2090
2117
|
}
|
|
2091
2118
|
}
|
|
2092
2119
|
} catch (err) {
|
|
2093
|
-
failUnlessAlreadyFailed(outcomes, records.length,
|
|
2120
|
+
failUnlessAlreadyFailed(outcomes, records.length, toError4(err));
|
|
2094
2121
|
}
|
|
2095
2122
|
return outcomes;
|
|
2096
2123
|
}
|
|
@@ -2929,7 +2956,7 @@ var decoder = new TextDecoder();
|
|
|
2929
2956
|
async function countPagedPartition(store, partition) {
|
|
2930
2957
|
const { directory } = store;
|
|
2931
2958
|
if (directory === void 0 || partition.segments.length === 0) return null;
|
|
2932
|
-
const { countsAsLatestHolder, isPagedSegmentFile, openPagedSegmentScan } = await import('./module-
|
|
2959
|
+
const { countsAsLatestHolder, isPagedSegmentFile, openPagedSegmentScan } = await import('./module-5LMDGXQH.mjs');
|
|
2933
2960
|
for (const ref of partition.segments) if (!await isPagedSegmentFile(directory, ref.key)) return null;
|
|
2934
2961
|
const scans = [];
|
|
2935
2962
|
try {
|
|
@@ -3376,7 +3403,8 @@ function createDurabilityManager(config, hooks, directoryOverride) {
|
|
|
3376
3403
|
let commitDeferral = null;
|
|
3377
3404
|
const partitionFailures = createPartitionFailureRouting();
|
|
3378
3405
|
const heldCheckpoints = createHeldCheckpoints(hooks);
|
|
3379
|
-
const metadataWrites =
|
|
3406
|
+
const metadataWrites = createMetadataWriteQueue();
|
|
3407
|
+
const queueMetadataWrite = metadataWrites.queue;
|
|
3380
3408
|
let checkpointTimer = null;
|
|
3381
3409
|
let asyncFlushTimer = null;
|
|
3382
3410
|
let shuttingDown = false;
|
|
@@ -3397,25 +3425,13 @@ function createDurabilityManager(config, hooks, directoryOverride) {
|
|
|
3397
3425
|
stopTimers();
|
|
3398
3426
|
hooks.onFatalError(error);
|
|
3399
3427
|
}
|
|
3400
|
-
function toError5(err) {
|
|
3401
|
-
return err instanceof Error ? err : new Error(String(err));
|
|
3402
|
-
}
|
|
3403
3428
|
async function closeWriterReportingFailure(closePromise) {
|
|
3404
3429
|
try {
|
|
3405
3430
|
await closePromise;
|
|
3406
3431
|
} catch (err) {
|
|
3407
|
-
markFatal(
|
|
3432
|
+
markFatal(toError(err));
|
|
3408
3433
|
}
|
|
3409
3434
|
}
|
|
3410
|
-
function queueMetadataWrite(indexName, write) {
|
|
3411
|
-
const previous = metadataWrites.get(indexName) ?? Promise.resolve();
|
|
3412
|
-
const queued = previous.then(write);
|
|
3413
|
-
metadataWrites.set(
|
|
3414
|
-
indexName,
|
|
3415
|
-
queued.catch(() => void 0)
|
|
3416
|
-
);
|
|
3417
|
-
return queued;
|
|
3418
|
-
}
|
|
3419
3435
|
function startCheckpointTimer() {
|
|
3420
3436
|
if (checkpointTimer !== null || shuttingDown || fatalError !== null || checkpointIntervalMs <= 0) {
|
|
3421
3437
|
return;
|
|
@@ -3439,25 +3455,25 @@ function createDurabilityManager(config, hooks, directoryOverride) {
|
|
|
3439
3455
|
try {
|
|
3440
3456
|
await checkpointIndex(indexName);
|
|
3441
3457
|
} catch (err) {
|
|
3442
|
-
markFatal(
|
|
3458
|
+
markFatal(toError(err));
|
|
3443
3459
|
}
|
|
3444
3460
|
}
|
|
3445
3461
|
}
|
|
3446
|
-
async function checkpointIndex(indexName, fromMemory = false, afterInFlight = fromMemory) {
|
|
3462
|
+
async function checkpointIndex(indexName, fromMemory = false, afterInFlight = fromMemory, pinsRetiredVectors = false) {
|
|
3447
3463
|
const indexState = indexes.get(indexName);
|
|
3448
3464
|
if (indexState === void 0 || indexState.unloading || heldCheckpoints.holds(indexName, indexState)) return;
|
|
3449
3465
|
return checkpointInTurn(indexState, {
|
|
3450
|
-
joinsInFlight: !afterInFlight,
|
|
3466
|
+
joinsInFlight: !afterInFlight && !pinsRetiredVectors,
|
|
3451
3467
|
mayStart: () => !indexState.unloading && !shuttingDown,
|
|
3452
|
-
perform: () => performCheckpoint(indexName, indexState, fromMemory),
|
|
3468
|
+
perform: () => performCheckpoint(indexName, indexState, fromMemory, pinsRetiredVectors),
|
|
3453
3469
|
afterSettling: () => releaseStalledWrites(indexState)
|
|
3454
3470
|
});
|
|
3455
3471
|
}
|
|
3456
|
-
async function requestedCheckpoint(indexName, fromMemory = false) {
|
|
3472
|
+
async function requestedCheckpoint(indexName, fromMemory = false, pinsVectors = false) {
|
|
3457
3473
|
heldCheckpoints.refuse(indexName, indexes.get(indexName));
|
|
3458
|
-
return checkpointIndex(indexName, fromMemory);
|
|
3474
|
+
return checkpointIndex(indexName, fromMemory, fromMemory, pinsVectors);
|
|
3459
3475
|
}
|
|
3460
|
-
async function performCheckpoint(indexName, indexState, fromMemory = false) {
|
|
3476
|
+
async function performCheckpoint(indexName, indexState, fromMemory = false, pinsRetiredVectors = false) {
|
|
3461
3477
|
await directoryWatch.verify();
|
|
3462
3478
|
if (fatalError !== null) throw fatalError;
|
|
3463
3479
|
await runDurableCheckpoint({
|
|
@@ -3468,6 +3484,7 @@ function createDurabilityManager(config, hooks, directoryOverride) {
|
|
|
3468
3484
|
compactionThreshold,
|
|
3469
3485
|
canOffload: canOffloadCheckpoint,
|
|
3470
3486
|
fromMemory,
|
|
3487
|
+
pinsRetiredVectors,
|
|
3471
3488
|
mutationThreshold: checkpointMutationThreshold,
|
|
3472
3489
|
mayContinue: () => !indexState.unloading && !shuttingDown && fatalError === null,
|
|
3473
3490
|
holdsCheckpointFiles: () => heldCheckpointFiles.has(indexName),
|
|
@@ -3509,7 +3526,7 @@ function createDurabilityManager(config, hooks, directoryOverride) {
|
|
|
3509
3526
|
indexState.documentBytesSinceCheckpoint += recorded.documentBytes;
|
|
3510
3527
|
if (checkpointIsDue(indexState, checkpointMutationThreshold)) {
|
|
3511
3528
|
void checkpointIndex(indexName).catch((err) => {
|
|
3512
|
-
markFatal(
|
|
3529
|
+
markFatal(toError(err));
|
|
3513
3530
|
});
|
|
3514
3531
|
}
|
|
3515
3532
|
await stallWhileCheckpointsFallBehind(indexState);
|
|
@@ -3613,7 +3630,7 @@ function createDurabilityManager(config, hooks, directoryOverride) {
|
|
|
3613
3630
|
},
|
|
3614
3631
|
async checkpointAfterInFlight(indexName) {
|
|
3615
3632
|
await loads.settled(indexName);
|
|
3616
|
-
await checkpointIndex(indexName, false, true).catch((err) => markFatal(
|
|
3633
|
+
await checkpointIndex(indexName, false, true).catch((err) => markFatal(toError(err)));
|
|
3617
3634
|
},
|
|
3618
3635
|
async checkpointAll() {
|
|
3619
3636
|
for (const indexName of [...indexes.keys()]) {
|
|
@@ -3624,9 +3641,9 @@ function createDurabilityManager(config, hooks, directoryOverride) {
|
|
|
3624
3641
|
hooks.writeRecords?.dropIndex(indexName);
|
|
3625
3642
|
const indexState = indexes.get(indexName);
|
|
3626
3643
|
if (indexState !== void 0) {
|
|
3627
|
-
await drainIndexStateForUnload(indexState, metadataWrites.
|
|
3644
|
+
await drainIndexStateForUnload(indexState, metadataWrites.pending(indexName), closeWriterReportingFailure);
|
|
3628
3645
|
indexes.delete(indexName);
|
|
3629
|
-
metadataWrites.
|
|
3646
|
+
metadataWrites.forget(indexName);
|
|
3630
3647
|
}
|
|
3631
3648
|
for (const vectorIndex of hooks.getVectorIndexes(indexName).values()) await vectorIndex.releaseVectorFiles();
|
|
3632
3649
|
for (const key of await directory.list(`${indexName}/`)) {
|
|
@@ -3638,14 +3655,14 @@ function createDurabilityManager(config, hooks, directoryOverride) {
|
|
|
3638
3655
|
if (indexState === void 0) {
|
|
3639
3656
|
return;
|
|
3640
3657
|
}
|
|
3641
|
-
await drainIndexStateForUnload(indexState, metadataWrites.
|
|
3658
|
+
await drainIndexStateForUnload(indexState, metadataWrites.pending(indexName), (close) => close);
|
|
3642
3659
|
indexes.delete(indexName);
|
|
3643
|
-
metadataWrites.
|
|
3660
|
+
metadataWrites.forget(indexName);
|
|
3644
3661
|
},
|
|
3645
3662
|
...createArchiveCheckpointAccess({
|
|
3646
3663
|
directory,
|
|
3647
3664
|
held: heldCheckpointFiles,
|
|
3648
|
-
checkpoint: (name) => requestedCheckpoint(name),
|
|
3665
|
+
checkpoint: (name, pinsVectors) => requestedCheckpoint(name, false, pinsVectors),
|
|
3649
3666
|
registerPartition: (name, partitionId, startSeqNo, primaryTerm) => getOrCreatePartition(name, partitionId, startSeqNo, primaryTerm),
|
|
3650
3667
|
markFatal
|
|
3651
3668
|
}),
|
|
@@ -3735,7 +3752,7 @@ function createSnapshotIndexState() {
|
|
|
3735
3752
|
}
|
|
3736
3753
|
|
|
3737
3754
|
// src/persistence/durability/snapshot-only/restores.ts
|
|
3738
|
-
function
|
|
3755
|
+
function toError5(error) {
|
|
3739
3756
|
return error instanceof Error ? error : new Error(String(error));
|
|
3740
3757
|
}
|
|
3741
3758
|
function createPendingRestores(onFatalError) {
|
|
@@ -3756,7 +3773,7 @@ function createPendingRestores(onFatalError) {
|
|
|
3756
3773
|
return running;
|
|
3757
3774
|
};
|
|
3758
3775
|
pending.set(indexName, finish);
|
|
3759
|
-
void finish().catch((error) => onFatalError(
|
|
3776
|
+
void finish().catch((error) => onFatalError(toError5(error)));
|
|
3760
3777
|
return Promise.resolve();
|
|
3761
3778
|
},
|
|
3762
3779
|
async settle(indexName) {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { DOCUMENT_EXPORT_FORMAT, DOCUMENT_EXPORT_VERSION, readDocumentExport } from './chunk-GP4QLUQM.mjs';
|
|
2
|
+
import './chunk-6OFS7RUN.mjs';
|
|
3
|
+
import './chunk-XWMEGKDC.mjs';
|
|
4
|
+
import './chunk-ZALEKEUH.mjs';
|
|
5
|
+
import './chunk-JPTQZWJQ.mjs';
|
|
6
|
+
import './chunk-26A5JFT2.mjs';
|
|
7
|
+
import './chunk-QNDWMPV2.mjs';
|
|
8
|
+
import './chunk-75PMIFQA.mjs';
|
|
9
|
+
import './chunk-IFGTRRPU.mjs';
|
|
@@ -1,12 +1,12 @@
|
|
|
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-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './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-ZKVDQ5ZH.mjs';
|
|
2
|
+
import './chunk-LGJ6XMH5.mjs';
|
|
3
|
+
import './chunk-PMBSBSCN.mjs';
|
|
4
|
+
import './chunk-XIHLIMFX.mjs';
|
|
5
|
+
import './chunk-XWMEGKDC.mjs';
|
|
6
|
+
import './chunk-FHO5N7FD.mjs';
|
|
7
|
+
import './chunk-ZALEKEUH.mjs';
|
|
8
8
|
import './chunk-JPTQZWJQ.mjs';
|
|
9
9
|
import './chunk-26A5JFT2.mjs';
|
|
10
|
-
import './chunk-
|
|
11
|
-
import './chunk-
|
|
12
|
-
import './chunk-
|
|
10
|
+
import './chunk-QNDWMPV2.mjs';
|
|
11
|
+
import './chunk-75PMIFQA.mjs';
|
|
12
|
+
import './chunk-IFGTRRPU.mjs';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { spawnNodeWorker } from './chunk-HOZW3PKP.mjs';
|
|
2
|
-
import { VECTOR_WORKER_COPIES_ALLOWED, DEFAULT_PROMOTION_THRESHOLD, DEFAULT_FILTER_THRESHOLD, noBuildHistory, recordCheckpoint, planCheckpoint, deserialize, assignStorePartitions, liveSize, ordinalFilterForSubsets, handOverBuildTurns, filterForOptions, OSQ4_MIN_DIMENSION, emptyFieldBeforeRestore, ESTIMATED_MS_PER_TOMBSTONE, graphNeedsRebuild, ESTIMATED_MS_PER_VECTOR_REBUILD, releaseReplacedVectors, yieldBuildTurn, allLiveDocIds, threadsHoldCurrentLayout, WORKER_COPY_MIN_VECTORS, SHUFFLED_REBUILD_MEMORY_RETRY_MS, recalibrateFromStore, signatureOf, adoptGraph, BUILD_RETRY_MAX_DELAY_MS, BUILD_RETRY_FIRST_DELAY_MS, fieldHandlesOf, liveOrdinals, RECALIBRATION_CHUNK_VECTORS, BUILD_CHUNK_SIZE, DRIFT_CHECK_GROWTH_FACTOR, DISK_ADOPTION_YIELD_INTERVAL, adoptLoadedCalibration, RECALIBRATION_DRIFT_RATIO } from './chunk-
|
|
3
|
-
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, sharedVectorStoreBytes, STORE_SLOTS, IN_MEMORY, resetStoreHeader, STORE_RELEASED_VECTORS_TO_DISK, magnitude, createOrdinalFilter, addToOrdinalFilter, nativeScoresOf, toScore, ordinalFilterHas, openVectorBlock, NOTHING_STAGED, arenaFloat32Distance, slotByteOffset, detachNativeStore, STORE_BLOCK_COUNT, STORE_CODE_BLOCK_COUNT, createSharedVectorStoreHandles, BLOCK_MAX_BYTES, STORE_DOC_ID_BYTES, unplacedChunkCount, blocksGrowthBytes, growBufferTo, nativeStoreScratchBytes, noteFallback, toDistance, euclideanDistance, dotProduct, cosineSimilarityWithMagnitudes, QUERY_STAGED, grownByteLength, createVectorBlock, ensureBlockSlots, createHNSWIndex, topLayerInParts, sharedMemoryAvailable, requireWholeNeighbourLists, shuffleInPlace, createCentroidSums, centroidOfCentroidSums, meanOfCentroidSums, countOfCentroidSums, squaredLengthsOfCentroidSums, releaseLocksHeldBy } from './chunk-
|
|
4
|
-
export { releaseLocksHeldBy } from './chunk-
|
|
5
|
-
import { isDead, NO_LIVE_VECTOR_AT_POSITION, bytesToVectors } from './chunk-
|
|
6
|
-
import { createVectorFileReader } from './chunk-
|
|
2
|
+
import { VECTOR_WORKER_COPIES_ALLOWED, DEFAULT_PROMOTION_THRESHOLD, DEFAULT_FILTER_THRESHOLD, noBuildHistory, recordCheckpoint, planCheckpoint, deserialize, assignStorePartitions, liveSize, ordinalFilterForSubsets, handOverBuildTurns, filterForOptions, OSQ4_MIN_DIMENSION, emptyFieldBeforeRestore, ESTIMATED_MS_PER_TOMBSTONE, graphNeedsRebuild, ESTIMATED_MS_PER_VECTOR_REBUILD, releaseReplacedVectors, yieldBuildTurn, allLiveDocIds, threadsHoldCurrentLayout, WORKER_COPY_MIN_VECTORS, SHUFFLED_REBUILD_MEMORY_RETRY_MS, recalibrateFromStore, signatureOf, adoptGraph, BUILD_RETRY_MAX_DELAY_MS, BUILD_RETRY_FIRST_DELAY_MS, fieldHandlesOf, liveOrdinals, RECALIBRATION_CHUNK_VECTORS, BUILD_CHUNK_SIZE, DRIFT_CHECK_GROWTH_FACTOR, DISK_ADOPTION_YIELD_INTERVAL, adoptLoadedCalibration, RECALIBRATION_DRIFT_RATIO } from './chunk-K7UFXEJS.mjs';
|
|
3
|
+
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, sharedVectorStoreBytes, STORE_SLOTS, IN_MEMORY, resetStoreHeader, STORE_RELEASED_VECTORS_TO_DISK, magnitude, createOrdinalFilter, addToOrdinalFilter, nativeScoresOf, toScore, ordinalFilterHas, openVectorBlock, NOTHING_STAGED, arenaFloat32Distance, slotByteOffset, detachNativeStore, STORE_BLOCK_COUNT, STORE_CODE_BLOCK_COUNT, createSharedVectorStoreHandles, BLOCK_MAX_BYTES, STORE_DOC_ID_BYTES, unplacedChunkCount, blocksGrowthBytes, growBufferTo, nativeStoreScratchBytes, noteFallback, toDistance, euclideanDistance, dotProduct, cosineSimilarityWithMagnitudes, QUERY_STAGED, grownByteLength, createVectorBlock, ensureBlockSlots, createHNSWIndex, topLayerInParts, sharedMemoryAvailable, requireWholeNeighbourLists, shuffleInPlace, createCentroidSums, centroidOfCentroidSums, meanOfCentroidSums, countOfCentroidSums, squaredLengthsOfCentroidSums, releaseLocksHeldBy } from './chunk-U77XQJOY.mjs';
|
|
4
|
+
export { releaseLocksHeldBy } from './chunk-U77XQJOY.mjs';
|
|
5
|
+
import { isDead, NO_LIVE_VECTOR_AT_POSITION, bytesToVectors } from './chunk-BTMRV5MY.mjs';
|
|
6
|
+
import { createVectorFileReader } from './chunk-FHO5N7FD.mjs';
|
|
7
7
|
import './chunk-OIZS5KIX.mjs';
|
|
8
|
-
import { MAX_RENUMBERED_SEARCH_ATTEMPTS, DISK_STORAGE_BLOCK_BYTES, compareCodePoints, UNPLACED_FLAG_CHUNK_ORDINALS, MAX_VECTOR_ORDINALS, GRAPH_BUILD_CHUNKS_IN_FLIGHT_PER_WORKER, GRAPH_BUILD_DISPATCH_CHUNK, resolveWorkerCount, resolveWorkerEntry, detectRuntime, noteThreadSlotLive, noteThreadSlotGone, WORKER_YOUNG_GENERATION_MB, VECTOR_SEARCH_TIMEOUT_MS, VECTOR_SEARCH_LOAD_TIMEOUT_MS, VECTOR_SCRATCH_SLOTS, VECTOR_INSERT_TIMEOUT_MS } from './chunk-
|
|
9
|
-
import './chunk-
|
|
10
|
-
import { NarsilError, ErrorCodes, isNarsilError } from './chunk-
|
|
8
|
+
import { MAX_RENUMBERED_SEARCH_ATTEMPTS, DISK_STORAGE_BLOCK_BYTES, compareCodePoints, UNPLACED_FLAG_CHUNK_ORDINALS, MAX_VECTOR_ORDINALS, GRAPH_BUILD_CHUNKS_IN_FLIGHT_PER_WORKER, GRAPH_BUILD_DISPATCH_CHUNK, resolveWorkerCount, resolveWorkerEntry, detectRuntime, noteThreadSlotLive, noteThreadSlotGone, WORKER_YOUNG_GENERATION_MB, VECTOR_SEARCH_TIMEOUT_MS, VECTOR_SEARCH_LOAD_TIMEOUT_MS, VECTOR_SCRATCH_SLOTS, VECTOR_INSERT_TIMEOUT_MS } from './chunk-QNDWMPV2.mjs';
|
|
9
|
+
import './chunk-75PMIFQA.mjs';
|
|
10
|
+
import { NarsilError, ErrorCodes, isNarsilError } from './chunk-IFGTRRPU.mjs';
|
|
11
11
|
|
|
12
12
|
// src/core/heap.ts
|
|
13
13
|
function createMaxHeap(compare) {
|
|
@@ -1056,6 +1056,60 @@ function partitionFilterOf(store, documents, partitionIds) {
|
|
|
1056
1056
|
return filter;
|
|
1057
1057
|
}
|
|
1058
1058
|
|
|
1059
|
+
// src/vector/vector-store/retired-pins.ts
|
|
1060
|
+
function createRetiredVectorPins() {
|
|
1061
|
+
let pins = 0;
|
|
1062
|
+
let lost = false;
|
|
1063
|
+
const retired = /* @__PURE__ */ new Set();
|
|
1064
|
+
return {
|
|
1065
|
+
pin() {
|
|
1066
|
+
pins += 1;
|
|
1067
|
+
},
|
|
1068
|
+
unpin() {
|
|
1069
|
+
if (pins === 0) return;
|
|
1070
|
+
pins -= 1;
|
|
1071
|
+
if (pins > 0) return;
|
|
1072
|
+
retired.clear();
|
|
1073
|
+
lost = false;
|
|
1074
|
+
},
|
|
1075
|
+
note(ordinal) {
|
|
1076
|
+
if (pins > 0) retired.add(ordinal);
|
|
1077
|
+
},
|
|
1078
|
+
holds(ordinal) {
|
|
1079
|
+
return retired.has(ordinal);
|
|
1080
|
+
},
|
|
1081
|
+
keptWith(replaced) {
|
|
1082
|
+
if (retired.size === 0) return replaced;
|
|
1083
|
+
const kept = new Set(replaced);
|
|
1084
|
+
for (const ordinal of retired) kept.add(ordinal);
|
|
1085
|
+
return kept;
|
|
1086
|
+
},
|
|
1087
|
+
forget() {
|
|
1088
|
+
retired.clear();
|
|
1089
|
+
if (pins > 0) lost = true;
|
|
1090
|
+
},
|
|
1091
|
+
requireIntact() {
|
|
1092
|
+
if (!lost) return;
|
|
1093
|
+
throw new NarsilError(
|
|
1094
|
+
ErrorCodes.PERSISTENCE_SAVE_FAILED,
|
|
1095
|
+
"The vector store was emptied while a checkpoint read the vectors it captured, so the checkpoint stops"
|
|
1096
|
+
);
|
|
1097
|
+
}
|
|
1098
|
+
};
|
|
1099
|
+
}
|
|
1100
|
+
function pinnedReads(pins, openStore, readable) {
|
|
1101
|
+
return {
|
|
1102
|
+
pinRetiredVectors: () => pins.pin(),
|
|
1103
|
+
unpinRetiredVectors: () => pins.unpin(),
|
|
1104
|
+
entryForPinnedOrdinal(ordinal) {
|
|
1105
|
+
pins.requireIntact();
|
|
1106
|
+
const open = openStore();
|
|
1107
|
+
if (open === null || !(readable(ordinal) || pins.holds(ordinal))) return void 0;
|
|
1108
|
+
return entryAt(open, ordinal);
|
|
1109
|
+
}
|
|
1110
|
+
};
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1059
1113
|
// src/vector/vector-store/index.ts
|
|
1060
1114
|
var UNKNOWN_PARTITION = -1;
|
|
1061
1115
|
var NO_PARTITION = -2;
|
|
@@ -1065,6 +1119,7 @@ function createVectorStore(options) {
|
|
|
1065
1119
|
const docToOrd = /* @__PURE__ */ new Map();
|
|
1066
1120
|
const ordToDoc = [];
|
|
1067
1121
|
const replacedOrdinals = /* @__PURE__ */ new Set();
|
|
1122
|
+
const pins = createRetiredVectorPins();
|
|
1068
1123
|
let unknownPartitions = 0;
|
|
1069
1124
|
let liveCount = 0;
|
|
1070
1125
|
let readBackVector = null;
|
|
@@ -1073,6 +1128,7 @@ function createVectorStore(options) {
|
|
|
1073
1128
|
docToOrd.clear();
|
|
1074
1129
|
ordToDoc.length = 0;
|
|
1075
1130
|
replacedOrdinals.clear();
|
|
1131
|
+
pins.forget();
|
|
1076
1132
|
unknownPartitions = 0;
|
|
1077
1133
|
liveCount = 0;
|
|
1078
1134
|
}
|
|
@@ -1093,6 +1149,7 @@ function createVectorStore(options) {
|
|
|
1093
1149
|
function retireOrdinal(store, ordinal) {
|
|
1094
1150
|
ordToDoc[ordinal] = void 0;
|
|
1095
1151
|
Atomics.store(store.present, ordinal, 0);
|
|
1152
|
+
pins.note(ordinal);
|
|
1096
1153
|
if (store.partitions[ordinal] === UNKNOWN_PARTITION) unknownPartitions -= 1;
|
|
1097
1154
|
}
|
|
1098
1155
|
function keepReplacedOrdinal(store, ordinal) {
|
|
@@ -1170,9 +1227,11 @@ function createVectorStore(options) {
|
|
|
1170
1227
|
releaseReplacedVectors() {
|
|
1171
1228
|
const released = [...replacedOrdinals];
|
|
1172
1229
|
replacedOrdinals.clear();
|
|
1230
|
+
for (const ordinal of released) pins.note(ordinal);
|
|
1173
1231
|
if (open !== null) for (const ordinal of released) Atomics.store(open.present, ordinal, 0);
|
|
1174
1232
|
return released;
|
|
1175
1233
|
},
|
|
1234
|
+
...pinnedReads(pins, () => open, readable),
|
|
1176
1235
|
insertCold(docId, vectorMagnitude, location, partitionId) {
|
|
1177
1236
|
const store = requireOpen();
|
|
1178
1237
|
const previous = docToOrd.get(docId);
|
|
@@ -1223,13 +1282,14 @@ function createVectorStore(options) {
|
|
|
1223
1282
|
},
|
|
1224
1283
|
releaseColdBlocks() {
|
|
1225
1284
|
const store = requireOpen();
|
|
1285
|
+
const kept = pins.keptWith(replacedOrdinals);
|
|
1226
1286
|
let released = 0;
|
|
1227
1287
|
for (let index = 0; index < store.handles.blocks.length; index++) {
|
|
1228
|
-
if (store.handles.blocks[index] === null || !blockFullyCold(store, index, ordToDoc,
|
|
1288
|
+
if (store.handles.blocks[index] === null || !blockFullyCold(store, index, ordToDoc, kept)) continue;
|
|
1229
1289
|
store.handles.blocks[index] = null;
|
|
1230
1290
|
released += 1;
|
|
1231
1291
|
}
|
|
1232
|
-
if (released + forgetUnreferencedFiles(store, ordToDoc,
|
|
1292
|
+
if (released + forgetUnreferencedFiles(store, ordToDoc, kept) > 0) relayout(store);
|
|
1233
1293
|
return released;
|
|
1234
1294
|
},
|
|
1235
1295
|
setPartition(docId, partitionId) {
|
|
@@ -3458,7 +3518,7 @@ function createVectorIndex(fieldName, dimension, config, workerCopies = VECTOR_W
|
|
|
3458
3518
|
invalidateWorkerCopies(state);
|
|
3459
3519
|
deserialize(state, parts);
|
|
3460
3520
|
},
|
|
3461
|
-
planCheckpoint: (listedKeys, rewritesGraph) => planCheckpoint(state, listedKeys, rewritesGraph),
|
|
3521
|
+
planCheckpoint: (listedKeys, rewritesGraph, pinsRetiredVectors) => planCheckpoint(state, listedKeys, rewritesGraph, pinsRetiredVectors),
|
|
3462
3522
|
recordCheckpoint: (plan, written) => recordCheckpoint(state, plan, written),
|
|
3463
3523
|
restoreCheckpoint: (shape) => {
|
|
3464
3524
|
cancelColdHold(state);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createBitSet, bitsetIsEmpty, GrowableUint32, PHRASE_ROWS_START, bitsetHas, bitsetSet, PHRASE_SORT_RADIX_BITS, PHRASE_SORT_CLOCK_ROWS } from './chunk-26A5JFT2.mjs';
|
|
2
|
-
import { NarsilError, ErrorCodes, MAX_QUERY_PHRASES, MAX_PHRASE_WORDS } from './chunk-
|
|
2
|
+
import { NarsilError, ErrorCodes, MAX_QUERY_PHRASES, MAX_PHRASE_WORDS } from './chunk-IFGTRRPU.mjs';
|
|
3
3
|
|
|
4
4
|
// src/core/partition/phrase-matching.ts
|
|
5
5
|
var UINT32_BITS = 32;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { abandonChangeOf } from './chunk-
|
|
1
|
+
import { abandonChangeOf } from './chunk-5WYWLTM5.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-2EGS2FYU.mjs');
|
|
28
28
|
await restoreFromSnapshot(indexName, data, restoreDepsOf(core, host));
|
|
29
29
|
});
|
|
30
30
|
const settled = restored.then(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MIN_RERANK_TIMEOUT_MS, MAX_RERANK_TIMEOUT_MS, MIN_RERANK_WINDOW, MAX_RERANK_WINDOW, DEFAULT_MAX_RERANK_WINDOW, DEFAULT_RERANK_TIMEOUT_MS, DEFAULT_RERANK_WINDOW } from './chunk-JPTQZWJQ.mjs';
|
|
2
|
-
import { DEFAULT_LIMIT, DEFAULT_OFFSET } from './chunk-
|
|
3
|
-
import { NarsilError, ErrorCodes, MIN_HYBRID_DEPTH, MAX_HYBRID_DEPTH, HYBRID_RESCORE_WINDOW, RESULT_WINDOW } from './chunk-
|
|
2
|
+
import { DEFAULT_LIMIT, DEFAULT_OFFSET } from './chunk-75PMIFQA.mjs';
|
|
3
|
+
import { NarsilError, ErrorCodes, MIN_HYBRID_DEPTH, MAX_HYBRID_DEPTH, HYBRID_RESCORE_WINDOW, RESULT_WINDOW } from './chunk-IFGTRRPU.mjs';
|
|
4
4
|
|
|
5
5
|
// src/search/hybrid-depth.ts
|
|
6
6
|
function fixedHybridDepthOf(hybrid) {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { indexMetadataOf, writeCheckpointSegments, writeLiveVectors, commitCheckpointManifest, decodeSegmentManifest, SINGLE_NODE_PRIMARY_TERM, partitionContentsOf, unpackIndexSnapshotEnvelope, loadSegmentedCheckpoint, writeMetadataEnvelope, openManifestPayload, listedKeysOf, decodeManifestPayload, readVectorFile, readGraphParts, documentsOfPayloadV2, deserializePayloadV1 } from './chunk-
|
|
2
|
-
import { createByteReader, restoredConfigFields, restoredEmbedding, rejectSnapshot } from './chunk-
|
|
3
|
-
import { DEFAULT_COMPACTION_THRESHOLD, manifestKey, manifestFileRefs, encodeSegmentManifest, readSegmentFile } from './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import { vectorsPerFile } from './chunk-
|
|
6
|
-
import './chunk-
|
|
7
|
-
import { decodeVectorIndexParts, vectorsToBytes, VECTOR_FILE_PAYLOAD_VERSION, bytesToVectors } from './chunk-
|
|
8
|
-
import { MAX_SNAPSHOT_ANALYSIS_ATTEMPTS, requireRestoreMemory, earlierSnapshotFootprint, archiveFootprint, storedBytesOfSegments } from './chunk-
|
|
9
|
-
import { encodeIndexConfiguration, hasNrslMagic, HEADER_SIZE, readHeader, ARRAY_POSITION_GAP, raiseEarlierReleaseGraphSetting, getLanguage, validateSchema, validatePatternValueLimit, requireSurfaceFormsForPartialFields, validateVectorPromotion, validateVectorStorage, validateTextStorage, validateRequiredFieldsInSchema, resolveIndexAnalysis, validateEmbeddingConfig, storedArrayPositionGap, prepareStoredSynonyms, loadVectorCodeFor, decodeEveryStoredDocument, parseVectorDimension, isCompositePartition, arrayPositionsAreStale, insertDocumentVectors, decodeIndexConfiguration, flattenSchema } from './chunk-
|
|
1
|
+
import { indexMetadataOf, writeCheckpointSegments, writeLiveVectors, commitCheckpointManifest, decodeSegmentManifest, SINGLE_NODE_PRIMARY_TERM, partitionContentsOf, unpackIndexSnapshotEnvelope, loadSegmentedCheckpoint, writeMetadataEnvelope, openManifestPayload, listedKeysOf, decodeManifestPayload, readVectorFile, readGraphParts, documentsOfPayloadV2, deserializePayloadV1 } from './chunk-FXPMF65P.mjs';
|
|
2
|
+
import { createByteReader, restoredConfigFields, restoredEmbedding, rejectSnapshot } from './chunk-6OFS7RUN.mjs';
|
|
3
|
+
import { DEFAULT_COMPACTION_THRESHOLD, manifestKey, manifestFileRefs, encodeSegmentManifest, readSegmentFile } from './chunk-LGJ6XMH5.mjs';
|
|
4
|
+
import './chunk-XIHLIMFX.mjs';
|
|
5
|
+
import { vectorsPerFile } from './chunk-K7UFXEJS.mjs';
|
|
6
|
+
import './chunk-U77XQJOY.mjs';
|
|
7
|
+
import { decodeVectorIndexParts, vectorsToBytes, VECTOR_FILE_PAYLOAD_VERSION, bytesToVectors } from './chunk-BTMRV5MY.mjs';
|
|
8
|
+
import { MAX_SNAPSHOT_ANALYSIS_ATTEMPTS, requireRestoreMemory, earlierSnapshotFootprint, archiveFootprint, storedBytesOfSegments } from './chunk-AOKLYVTT.mjs';
|
|
9
|
+
import { encodeIndexConfiguration, hasNrslMagic, HEADER_SIZE, readHeader, ARRAY_POSITION_GAP, raiseEarlierReleaseGraphSetting, getLanguage, validateSchema, validatePatternValueLimit, requireSurfaceFormsForPartialFields, validateVectorPromotion, validateVectorStorage, validateTextStorage, validateRequiredFieldsInSchema, resolveIndexAnalysis, validateEmbeddingConfig, storedArrayPositionGap, prepareStoredSynonyms, loadVectorCodeFor, decodeEveryStoredDocument, parseVectorDimension, isCompositePartition, arrayPositionsAreStale, insertDocumentVectors, decodeIndexConfiguration, flattenSchema } from './chunk-ZALEKEUH.mjs';
|
|
10
10
|
import './chunk-JPTQZWJQ.mjs';
|
|
11
11
|
import './chunk-26A5JFT2.mjs';
|
|
12
12
|
import './chunk-OIZS5KIX.mjs';
|
|
13
|
-
import { MAX_FILE_BYTES } from './chunk-
|
|
14
|
-
import './chunk-
|
|
15
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
13
|
+
import { MAX_FILE_BYTES } from './chunk-QNDWMPV2.mjs';
|
|
14
|
+
import './chunk-75PMIFQA.mjs';
|
|
15
|
+
import { NarsilError, ErrorCodes } from './chunk-IFGTRRPU.mjs';
|
|
16
16
|
import { decode } from '@msgpack/msgpack';
|
|
17
17
|
|
|
18
18
|
// src/persistence/archive/memory-store.ts
|
|
@@ -82,7 +82,8 @@ function partitionVectorPlan(vectorIndex, docIds) {
|
|
|
82
82
|
newFiles: files.length,
|
|
83
83
|
graphParts: null,
|
|
84
84
|
signature: { revision: 0, graphSize: -1, calibration: null },
|
|
85
|
-
readNewFile: (index) => files[index]
|
|
85
|
+
readNewFile: (index) => files[index],
|
|
86
|
+
release: () => void 0
|
|
86
87
|
};
|
|
87
88
|
}
|
|
88
89
|
function capture(input) {
|
|
@@ -556,7 +557,7 @@ async function validateStagedCheckpoint(store, manifest) {
|
|
|
556
557
|
for (const ref of partition.segments) {
|
|
557
558
|
const { directory } = store;
|
|
558
559
|
if (directory !== void 0) {
|
|
559
|
-
const { checkPagedSegmentFully, isPagedSegmentFile } = await import('./module-
|
|
560
|
+
const { checkPagedSegmentFully, isPagedSegmentFile } = await import('./module-5LMDGXQH.mjs');
|
|
560
561
|
if (await isPagedSegmentFile(directory, ref.key)) {
|
|
561
562
|
requireSchemaOfManifest(ref.key, await checkPagedSegmentFully(directory, ref), manifest);
|
|
562
563
|
continue;
|
|
@@ -924,7 +925,7 @@ async function stageArchive(indexName, reader, staging, deps) {
|
|
|
924
925
|
if (manifest === null) missingPart("manifest");
|
|
925
926
|
const { directory } = staging;
|
|
926
927
|
if (keepsTextOnDisk(prepared, staging) && directory !== void 0) {
|
|
927
|
-
const { bytesThatSegmentsHoldInMemory } = await import('./module-
|
|
928
|
+
const { bytesThatSegmentsHoldInMemory } = await import('./module-5LMDGXQH.mjs');
|
|
928
929
|
const replacesIndex = deps.indexRegistry.has(indexName);
|
|
929
930
|
const segmentBytes = await bytesThatSegmentsHoldInMemory(directory, manifest);
|
|
930
931
|
requireRestoreMemory(indexName, archiveFootprint(prepared, manifest, replacesIndex, segmentBytes), replacesIndex);
|