@delali/narsil 0.3.1-next.109 → 0.3.1-next.111
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.mjs +1 -1
- package/dist/adapters/indexeddb.mjs +1 -1
- package/dist/browser/{chunk-RYWURYTW.mjs → chunk-2CBQ2PCC.mjs} +1 -1
- package/dist/browser/{chunk-3RXEGUGO.mjs → chunk-5BQPBG3G.mjs} +41 -4
- package/dist/browser/{chunk-XHRHOH2P.mjs → chunk-6YUUEMQ4.mjs} +139 -28
- package/dist/browser/{chunk-SCBBEQWD.mjs → chunk-HQOYKRMB.mjs} +13 -13
- package/dist/browser/{chunk-EQ7BQ6VZ.mjs → chunk-LJS6PREA.mjs} +1 -0
- package/dist/browser/{chunk-Z2K5AGZL.mjs → chunk-OVY4RPDS.mjs} +3 -3
- package/dist/browser/{chunk-S7KNCVPU.mjs → chunk-P7C2S5JX.mjs} +2 -2
- package/dist/browser/{durability-wiring-JJGE7MED.mjs → durability-wiring-CYAJBYCO.mjs} +48 -20
- package/dist/browser/{module-PCKQADMQ.mjs → module-DYKR4INA.mjs} +5 -5
- package/dist/browser/{restore-queue-2STSWU2E.mjs → restore-queue-RTZGJT4D.mjs} +1 -1
- package/dist/browser/{runtime-ARKW5NZX.mjs → runtime-FL5K4JOH.mjs} +1 -1
- package/dist/browser/{snapshot-3AZDQKNA.mjs → snapshot-BU6I25CW.mjs} +27 -14
- package/dist/browser/{write-XXLMPT3Y.mjs → write-RUPYHPBZ.mjs} +5 -5
- package/dist/{capabilities-D4MUmjfe.d.ts → capabilities-ByaX8Arf.d.ts} +2 -2
- package/dist/{chunk-FN75BCXC.mjs → chunk-2RAQKITH.mjs} +1 -1
- package/dist/{chunk-SAZB7ZHT.mjs → chunk-542TD4BL.mjs} +1 -1
- package/dist/{chunk-YP23IAV5.mjs → chunk-63HFWQEA.mjs} +4 -3
- package/dist/{chunk-FV5CP3E2.mjs → chunk-6ODIY6ZB.mjs} +1 -1
- package/dist/{chunk-RQ7LOBLD.mjs → chunk-6PN3U6XW.mjs} +1 -1
- package/dist/{chunk-CYXLPFBG.mjs → chunk-6S7YRUPQ.mjs} +123 -35
- package/dist/{chunk-C57FPCTL.mjs → chunk-7JOONQ24.mjs} +6 -6
- package/dist/{chunk-IBJWO5PF.mjs → chunk-7ZZQNOIY.mjs} +1 -1
- package/dist/{chunk-SYHS56F7.mjs → chunk-CUVTRLA4.mjs} +26 -13
- package/dist/{chunk-AWZVJCCW.mjs → chunk-DG62H7OD.mjs} +2 -2
- package/dist/{chunk-LWQTFKRS.mjs → chunk-FUUP45IS.mjs} +1 -1
- package/dist/{chunk-C55OFKU6.mjs → chunk-HNAP2KTG.mjs} +2 -2
- package/dist/{chunk-5LP7OU6B.mjs → chunk-IR4KQ4WB.mjs} +2 -2
- package/dist/{chunk-ICZW4J3I.mjs → chunk-IW6UR3AF.mjs} +21 -21
- package/dist/{chunk-FABI2JA7.mjs → chunk-J6YVB2XM.mjs} +1 -1
- package/dist/{chunk-H5465KUZ.mjs → chunk-JBPYFYIU.mjs} +4 -3
- package/dist/{chunk-62GK7UUS.mjs → chunk-KCQG2PJT.mjs} +3 -3
- package/dist/{chunk-U6FT7LKG.mjs → chunk-LOBYK2FG.mjs} +3 -3
- package/dist/{chunk-XY6Z7T5W.mjs → chunk-N57XXGPG.mjs} +2 -2
- package/dist/{chunk-S2CKO6PP.mjs → chunk-OBWUWZRA.mjs} +1 -0
- package/dist/{chunk-CKRP7GCS.mjs → chunk-OCB7TMUQ.mjs} +1 -1
- package/dist/{chunk-NYWUBTMH.mjs → chunk-OFYKBKKV.mjs} +1 -1
- package/dist/{chunk-VIXXQEX6.mjs → chunk-PKE2PCTS.mjs} +43 -6
- package/dist/{chunk-ZBZRBM2Z.mjs → chunk-PT7VRWS7.mjs} +3 -3
- package/dist/{chunk-DUWYU4D5.mjs → chunk-PWIWSUCX.mjs} +2 -2
- package/dist/{chunk-5W7ADHK7.mjs → chunk-QI6JW4PM.mjs} +1 -1
- package/dist/{chunk-SD2EYVU4.mjs → chunk-QIFOXLWF.mjs} +2 -2
- package/dist/{chunk-N75MAOM7.mjs → chunk-R2MRGYU5.mjs} +2 -2
- package/dist/{chunk-4GD43FSW.mjs → chunk-R2MRMH6M.mjs} +10 -10
- package/dist/{chunk-RSSLOFRP.mjs → chunk-SXVDBHYJ.mjs} +39 -8
- package/dist/{chunk-HL2GAS5N.mjs → chunk-UGKO3RG2.mjs} +7 -7
- package/dist/{chunk-5DPTHLMX.mjs → chunk-V7G627TA.mjs} +1 -1
- package/dist/{chunk-MVWWAHTR.mjs → chunk-VK45J47R.mjs} +1 -1
- package/dist/{chunk-RPIE4QCL.mjs → chunk-YH5OIL7B.mjs} +2 -0
- package/dist/{chunk-JKOBHB4A.mjs → chunk-YIDSHBQS.mjs} +2 -2
- package/dist/{chunk-PA5WZWLC.mjs → chunk-YLE75NQ5.mjs} +2 -2
- package/dist/{chunk-A2HWRBQE.mjs → chunk-YSR5L3XJ.mjs} +2 -2
- package/dist/{client-Ba9yP-Rr.d.ts → client-BdnzDFtO.d.ts} +2 -2
- package/dist/client.d.ts +6 -6
- package/dist/client.mjs +1 -0
- package/dist/{config-C-xXz8bC.d.ts → config-CSgvApt0.d.ts} +1 -1
- package/dist/{config-Dc_8-byz.d.ts → config-ujZESkJz.d.ts} +1 -1
- package/dist/{direct-executor-QH2M6AK2.mjs → direct-executor-QFAUKTCQ.mjs} +11 -11
- package/dist/distribution/coordinator/etcd.mjs +94 -5
- package/dist/distribution/transport/grpc.mjs +24 -8
- package/dist/distribution/transport/in-memory.mjs +4 -4
- package/dist/distribution/transport/tcp.mjs +6 -6
- package/dist/distribution.d.ts +5 -5
- package/dist/distribution.mjs +1232 -377
- package/dist/{durability-wiring-4HWX7OVP.mjs → durability-wiring-NUHTYXHA.mjs} +65 -38
- package/dist/embeddings/openai.mjs +2 -2
- package/dist/{engine-CMZ5XSLy.d.ts → engine-C_HSy3iz.d.ts} +1 -1
- package/dist/{events-dnvgprIl.d.ts → events-CJsXF1F9.d.ts} +1 -0
- package/dist/index.browser.mjs +3 -3
- package/dist/index.d.ts +5 -5
- package/dist/index.mjs +16 -16
- package/dist/{module-IYILOTU3.mjs → module-WP4VVGV2.mjs} +9 -9
- package/dist/partial-words.mjs +5 -5
- package/dist/pattern.mjs +3 -3
- package/dist/persistence/durability/checkpoint-worker.d.ts +12 -0
- package/dist/persistence/durability/checkpoint-worker.mjs +25 -23
- package/dist/react.d.ts +6 -6
- package/dist/react.mjs +1 -0
- package/dist/{rerank-EHJVXEDP.mjs → rerank-3POMPQNX.mjs} +4 -4
- package/dist/rerankers/http.mjs +2 -2
- package/dist/{restore-queue-BONSQWCI.mjs → restore-queue-QSLGXZJB.mjs} +1 -1
- package/dist/{runtime-LEX2F7OW.mjs → runtime-C2435MPK.mjs} +5 -5
- package/dist/server.d.ts +8 -8
- package/dist/server.mjs +12 -12
- package/dist/{snapshot-DWDLN5YW.mjs → snapshot-IV3S2TMI.mjs} +25 -25
- package/dist/synonyms.mjs +3 -3
- package/dist/{tasks-B4B2cMK5.d.ts → tasks-CI3Fvkxw.d.ts} +1 -1
- package/dist/{thread-I32PUURR.mjs → thread-THLCKMEB.mjs} +11 -11
- package/dist/vector/search-worker.mjs +4 -4
- package/dist/workers/entry.mjs +5 -5
- package/dist/{write-AOFSHACR.mjs → write-VGRTOS7N.mjs} +18 -18
- package/package.json +7 -7
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { nodeThreadId, spawnNodeWorker } from './chunk-HOZW3PKP.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, decodeSegmentManifest, readListedFile, adapterCheckpointStore, SINGLE_NODE_PRIMARY_TERM, readMetadataEnvelope, writeMetadataEnvelope, metadataFromConfig, DIRECTORY_LOCK_ATTEMPTS, createSeqOwner, readSegmentManifest, snapshotBundleKey, reclaimUnlistedKeys, manifestReferencedKeys, loadSegmentedCheckpoint, checkpointLastSeqNo, manifestFileRefs, DIRECTORY_LOCK_SETTLE_MS, readSegmentFile, isRecord, invalidManifest, deserializePayloadV2, unpackEnvelopeBytes, checkpointPrimaryTerm, frameRecord, isId, isUint32, isSequenceNumber, writeCheckpointSegments, partitionContentsOf, writeLiveVectors, commitCheckpointManifest, removeCheckpointGarbage, readWalSegments, durableRecordMissing, MAX_SEGMENTS_PER_PARTITION, growPartitionsTo, writeSegmentHeader, VECTOR_FILE_ENVELOPE_VERSION, SEGMENT_HEADER_SIZE, documentsOfPayloadV2, readCommitMarker, nextMarkerSlot, encodeMarkerSlot, markerSlotOffset, DIRECTORY_IDENTITY_CHECK_INTERVAL_MS, metadataConfigOf, buildEntry, readCurrentManifest, WHOLE_PARTITION_LARGEST_DOCUMENT_COUNT, WHOLE_PARTITION_MIN_CHANGED_SHARE, captureWholePartition, 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-
|
|
4
|
-
import { encodeDocument, fnv1a, requireValidFieldTypes, openChecksummedEnvelope, HEADER_SIZE, buildSegmentPayload, resolvePartitionInsertOptions, freezeSegmentShared, createSharedFrozenSegment } from './chunk-
|
|
5
|
-
import { decodeVectorIndexParts, VECTOR_FILE_MAX_VECTORS, deadBytesFor, countDead, decodeVectorFilePayload, decodeVectorGraphPayload, graphPartsOfEarlierPayload } from './chunk-
|
|
6
|
-
import { compareCodePoints, MIN_M, MAX_FILE_BYTES, detectRuntime, resolveWorkerEntry } from './chunk-
|
|
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, decodeSegmentManifest, readListedFile, adapterCheckpointStore, SINGLE_NODE_PRIMARY_TERM, readMetadataEnvelope, writeMetadataEnvelope, metadataFromConfig, DIRECTORY_LOCK_ATTEMPTS, createSeqOwner, readSegmentManifest, snapshotBundleKey, reclaimUnlistedKeys, manifestReferencedKeys, loadSegmentedCheckpoint, checkpointLastSeqNo, manifestFileRefs, DIRECTORY_LOCK_SETTLE_MS, readSegmentFile, isRecord, invalidManifest, deserializePayloadV2, unpackEnvelopeBytes, checkpointPrimaryTerm, frameRecord, isId, isUint32, isSequenceNumber, writeCheckpointSegments, partitionContentsOf, writeLiveVectors, commitCheckpointManifest, removeCheckpointGarbage, readWalSegments, durableRecordMissing, MAX_SEGMENTS_PER_PARTITION, growPartitionsTo, writeSegmentHeader, VECTOR_FILE_ENVELOPE_VERSION, SEGMENT_HEADER_SIZE, documentsOfPayloadV2, readCommitMarker, nextMarkerSlot, encodeMarkerSlot, markerSlotOffset, DIRECTORY_IDENTITY_CHECK_INTERVAL_MS, metadataConfigOf, buildEntry, readCurrentManifest, WHOLE_PARTITION_LARGEST_DOCUMENT_COUNT, WHOLE_PARTITION_MIN_CHANGED_SHARE, captureWholePartition, CHECKPOINT_TIMEOUT_RECOVERY_BACKOFF_MS, CHECKPOINT_WORKER_TIMEOUT_MS, CHECKPOINT_WORKER_IDLE_MS, LOG_RECORDS_PER_CHECKPOINT } from './chunk-6YUUEMQ4.mjs';
|
|
3
|
+
import { applyDeleteEntry, applyIndexEntry } from './chunk-5BQPBG3G.mjs';
|
|
4
|
+
import { encodeDocument, fnv1a, requireValidFieldTypes, openChecksummedEnvelope, HEADER_SIZE, buildSegmentPayload, resolvePartitionInsertOptions, freezeSegmentShared, createSharedFrozenSegment } from './chunk-HQOYKRMB.mjs';
|
|
5
|
+
import { decodeVectorIndexParts, VECTOR_FILE_MAX_VECTORS, deadBytesFor, countDead, decodeVectorFilePayload, decodeVectorGraphPayload, graphPartsOfEarlierPayload } from './chunk-P7C2S5JX.mjs';
|
|
6
|
+
import { compareCodePoints, MIN_M, MAX_FILE_BYTES, detectRuntime, resolveWorkerEntry } from './chunk-2CBQ2PCC.mjs';
|
|
7
7
|
import './chunk-JPTQZWJQ.mjs';
|
|
8
|
-
import { NarsilError, ErrorCodes, MAX_INDEX_NAME_LENGTH, INDEX_NAME_PATTERN } from './chunk-
|
|
8
|
+
import { NarsilError, ErrorCodes, MAX_INDEX_NAME_LENGTH, INDEX_NAME_PATTERN } from './chunk-LJS6PREA.mjs';
|
|
9
9
|
import { decode } from '@msgpack/msgpack';
|
|
10
10
|
|
|
11
11
|
// src/persistence/durability/node-fs.browser.ts
|
|
@@ -1108,6 +1108,7 @@ async function truncateSegmentTail(directory, key, durableByteLength) {
|
|
|
1108
1108
|
}
|
|
1109
1109
|
}
|
|
1110
1110
|
function applyEntry(entry, deps) {
|
|
1111
|
+
deps.writeRecords?.replayed(entry);
|
|
1111
1112
|
if (entry.operation === "DELETE") {
|
|
1112
1113
|
applyDeleteEntry(entry, deps.manager, deps.vectorIndexes);
|
|
1113
1114
|
return;
|
|
@@ -1166,7 +1167,7 @@ function noWholePartitions() {
|
|
|
1166
1167
|
return { contents: [], captured: [] };
|
|
1167
1168
|
}
|
|
1168
1169
|
function wholePartitionsWhereMostChanged(manager, rules) {
|
|
1169
|
-
const { priorCheckpoint, priorPartitionIds, everyPartition, aWorkerCanSerialise } = rules;
|
|
1170
|
+
const { priorCheckpoint, priorPartitionIds, everyPartition, aWorkerCanSerialise, captureRecords } = rules;
|
|
1170
1171
|
return (targets) => {
|
|
1171
1172
|
const whole = { contents: [], captured: [] };
|
|
1172
1173
|
const changed = targets.filter(
|
|
@@ -1180,17 +1181,18 @@ function wholePartitionsWhereMostChanged(manager, rules) {
|
|
|
1180
1181
|
const logMatchesMemory = targets.length === 1 && priorPartitionIds.every((partitionId) => partitionId === 0);
|
|
1181
1182
|
if (!everyPartition && !(mostOfEachChanged && logMatchesMemory)) return whole;
|
|
1182
1183
|
for (const { partitionId } of changed) {
|
|
1183
|
-
const
|
|
1184
|
+
const capture2 = captureRecords?.(partitionId);
|
|
1185
|
+
const captured = aWorkerCanSerialise ? captureWholePartition(manager, partitionId, capture2) : null;
|
|
1184
1186
|
if (captured !== null) {
|
|
1185
1187
|
whole.captured.push(captured);
|
|
1186
1188
|
} else if (everyPartition || !aWorkerCanSerialise) {
|
|
1187
|
-
whole.contents.push(partitionContentsOf(manager, partitionId));
|
|
1189
|
+
whole.contents.push(partitionContentsOf(manager, partitionId, capture2));
|
|
1188
1190
|
}
|
|
1189
1191
|
}
|
|
1190
1192
|
return whole;
|
|
1191
1193
|
};
|
|
1192
1194
|
}
|
|
1193
|
-
async function captureCheckpoint(indexState, manager, vectorIndexes, wholePartitionsOf = noWholePartitions, priorCheckpointThatLimitsTheRecords, listedVectorFields = []) {
|
|
1195
|
+
async function captureCheckpoint(indexState, manager, vectorIndexes, wholePartitionsOf = noWholePartitions, priorCheckpointThatLimitsTheRecords, listedVectorFields = [], termHistoryOf) {
|
|
1194
1196
|
for (const vectorIndex of vectorIndexes.values()) await vectorIndex.completeGraph();
|
|
1195
1197
|
return whileNoMutationApplies([...indexState.partitions.values()], () => {
|
|
1196
1198
|
const documentCount = manager.countDocuments();
|
|
@@ -1205,11 +1207,13 @@ async function captureCheckpoint(indexState, manager, vectorIndexes, wholePartit
|
|
|
1205
1207
|
snapshotCheckpointFor(priorCheckpointThatLimitsTheRecords, partitionId) + LOG_RECORDS_PER_CHECKPOINT
|
|
1206
1208
|
);
|
|
1207
1209
|
recordsLeftInLog += appliedSeqNo - lastSeqNo;
|
|
1208
|
-
|
|
1210
|
+
const target = {
|
|
1209
1211
|
partitionId,
|
|
1210
1212
|
lastSeqNo,
|
|
1211
1213
|
primaryTerm: partition?.seqOwner.primaryTerm ?? SINGLE_NODE_PRIMARY_TERM
|
|
1212
|
-
}
|
|
1214
|
+
};
|
|
1215
|
+
if (termHistoryOf !== void 0) target.termHistory = termHistoryOf(partitionId, lastSeqNo);
|
|
1216
|
+
targets.push(target);
|
|
1213
1217
|
}
|
|
1214
1218
|
const vectorPlans = /* @__PURE__ */ new Map();
|
|
1215
1219
|
for (const [fieldPath, vectorIndex] of vectorIndexes) {
|
|
@@ -1415,13 +1419,15 @@ function workerCanWriteEverySegment(input) {
|
|
|
1415
1419
|
}
|
|
1416
1420
|
async function writeIndexCheckpointSegments(input) {
|
|
1417
1421
|
const { directory, metadata, targets, compactionThreshold, prior, wholePartitions, capturedPartitions } = input;
|
|
1422
|
+
const { keepsWriteRecords } = input;
|
|
1418
1423
|
const offloaded = workerCanWriteEverySegment(input) ? await runCheckpointOnWorker({
|
|
1419
1424
|
root: directory.root,
|
|
1420
1425
|
metadata,
|
|
1421
1426
|
targets,
|
|
1422
1427
|
compactionThreshold,
|
|
1423
1428
|
prior,
|
|
1424
|
-
capturedPartitions: [...capturedPartitions]
|
|
1429
|
+
capturedPartitions: [...capturedPartitions],
|
|
1430
|
+
keepsWriteRecords
|
|
1425
1431
|
}) : null;
|
|
1426
1432
|
if (offloaded !== null) {
|
|
1427
1433
|
return offloaded;
|
|
@@ -1434,7 +1440,8 @@ async function writeIndexCheckpointSegments(input) {
|
|
|
1434
1440
|
compactionThreshold,
|
|
1435
1441
|
prior,
|
|
1436
1442
|
wholePartitions,
|
|
1437
|
-
capturedPartitions
|
|
1443
|
+
capturedPartitions,
|
|
1444
|
+
keepsWriteRecords
|
|
1438
1445
|
});
|
|
1439
1446
|
}
|
|
1440
1447
|
|
|
@@ -1539,6 +1546,8 @@ async function writeOneBoundedCheckpoint(input) {
|
|
|
1539
1546
|
}
|
|
1540
1547
|
const vectorIndexes = input.hooks.getVectorIndexes(input.indexName);
|
|
1541
1548
|
const store = directoryCheckpointStore(input.directory);
|
|
1549
|
+
const writeRecords = input.hooks.writeRecords ?? null;
|
|
1550
|
+
const { indexName } = input;
|
|
1542
1551
|
const priorManifest = await readCurrentManifest(store, input.indexName);
|
|
1543
1552
|
const capture2 = await captureCheckpoint(
|
|
1544
1553
|
input.indexState,
|
|
@@ -1548,10 +1557,14 @@ async function writeOneBoundedCheckpoint(input) {
|
|
|
1548
1557
|
priorCheckpoint: priorManifest?.checkpoint ?? [],
|
|
1549
1558
|
priorPartitionIds: (priorManifest?.partitions ?? []).map((partition) => partition.partitionId),
|
|
1550
1559
|
everyPartition: input.fromMemory,
|
|
1551
|
-
aWorkerCanSerialise: input.canOffload && checkpointWorkerIsUsable()
|
|
1560
|
+
aWorkerCanSerialise: input.canOffload && checkpointWorkerIsUsable(),
|
|
1561
|
+
...writeRecords === null ? {} : {
|
|
1562
|
+
captureRecords: (partitionId) => (segments2) => writeRecords.captureSegments(indexName, partitionId, segments2)
|
|
1563
|
+
}
|
|
1552
1564
|
}),
|
|
1553
1565
|
input.fromMemory ? void 0 : priorManifest?.checkpoint ?? [],
|
|
1554
|
-
priorManifest?.vectors ?? []
|
|
1566
|
+
priorManifest?.vectors ?? [],
|
|
1567
|
+
writeRecords === null ? void 0 : (partitionId, lastSeqNo) => writeRecords.termHistoryOf(indexName, partitionId, lastSeqNo)
|
|
1555
1568
|
);
|
|
1556
1569
|
const { targets, documentCount } = capture2;
|
|
1557
1570
|
await makeEveryAppliedMutationDurable(input.indexState, input.failPartition);
|
|
@@ -1566,7 +1579,8 @@ async function writeOneBoundedCheckpoint(input) {
|
|
|
1566
1579
|
canOffload: input.canOffload,
|
|
1567
1580
|
prior: priorManifest,
|
|
1568
1581
|
wholePartitions: capture2.wholePartitions.contents,
|
|
1569
|
-
capturedPartitions: capture2.wholePartitions.captured
|
|
1582
|
+
capturedPartitions: capture2.wholePartitions.captured,
|
|
1583
|
+
keepsWriteRecords: writeRecords !== null
|
|
1570
1584
|
})
|
|
1571
1585
|
);
|
|
1572
1586
|
await makeEveryAppliedMutationDurable(input.indexState, input.failPartition);
|
|
@@ -2980,7 +2994,8 @@ async function recoverCheckpoint(deps) {
|
|
|
2980
2994
|
}
|
|
2981
2995
|
const checkpoint = await loadSegmentedCheckpoint(deps.store, deps.indexName, decoded.manifest, {
|
|
2982
2996
|
manager: deps.manager,
|
|
2983
|
-
vectorIndexes: deps.vectorIndexes
|
|
2997
|
+
vectorIndexes: deps.vectorIndexes,
|
|
2998
|
+
writeRecords: deps.writeRecords ?? null
|
|
2984
2999
|
});
|
|
2985
3000
|
return { checkpoint: await deps.replay(checkpoint), upgradedDocumentCount: null };
|
|
2986
3001
|
}
|
|
@@ -3020,15 +3035,23 @@ async function recoverPersistedIndex(deps, indexName, metadataOnly) {
|
|
|
3020
3035
|
if (manager === void 0 || current === void 0) {
|
|
3021
3036
|
return;
|
|
3022
3037
|
}
|
|
3038
|
+
const writeRecords = hooks.writeRecords ?? null;
|
|
3039
|
+
writeRecords?.dropIndex(indexName);
|
|
3023
3040
|
const replayDeps = {
|
|
3024
3041
|
manager,
|
|
3025
3042
|
vectorFieldPaths: hooks.getVectorFieldPaths(indexName),
|
|
3026
|
-
vectorIndexes: hooks.getVectorIndexes(indexName)
|
|
3043
|
+
vectorIndexes: hooks.getVectorIndexes(indexName),
|
|
3044
|
+
writeRecords
|
|
3027
3045
|
};
|
|
3028
3046
|
const replay = async (checkpoint) => {
|
|
3029
3047
|
const replayed = [];
|
|
3030
3048
|
for (let partitionId = 0; partitionId < manager.partitionCount; partitionId += 1) {
|
|
3031
3049
|
const fromSeqNo = snapshotCheckpointFor(checkpoint, partitionId);
|
|
3050
|
+
writeRecords?.loadTermHistory(
|
|
3051
|
+
indexName,
|
|
3052
|
+
partitionId,
|
|
3053
|
+
checkpoint.find((entry) => entry.partitionId === partitionId)
|
|
3054
|
+
);
|
|
3032
3055
|
const { highestSeqNo, highestPrimaryTerm } = await replayWal(
|
|
3033
3056
|
directory,
|
|
3034
3057
|
indexName,
|
|
@@ -3055,7 +3078,8 @@ async function recoverPersistedIndex(deps, indexName, metadataOnly) {
|
|
|
3055
3078
|
compactionThreshold: deps.compactionThreshold,
|
|
3056
3079
|
keepsUnlistedFiles: deps.holdsCheckpointFiles(indexName),
|
|
3057
3080
|
replay,
|
|
3058
|
-
onLayoutUpgrade: hooks.onLayoutUpgrade
|
|
3081
|
+
onLayoutUpgrade: hooks.onLayoutUpgrade,
|
|
3082
|
+
writeRecords
|
|
3059
3083
|
});
|
|
3060
3084
|
for (const { partitionId, lastSeqNo, primaryTerm } of recovered.checkpoint) {
|
|
3061
3085
|
deps.registerPartition(indexName, partitionId, lastSeqNo, primaryTerm);
|
|
@@ -3281,6 +3305,9 @@ function createDurabilityManager(config, hooks, directoryOverride) {
|
|
|
3281
3305
|
commitDeferral = defersCommit ?? null;
|
|
3282
3306
|
},
|
|
3283
3307
|
isolatePartitionFailures: partitionFailures.isolate,
|
|
3308
|
+
keepWriteRecordsWith(keeper) {
|
|
3309
|
+
hooks.writeRecords = keeper;
|
|
3310
|
+
},
|
|
3284
3311
|
heldCheckpoints: () => heldCheckpoints.report(indexes),
|
|
3285
3312
|
async commitPartition(indexName, partitionId) {
|
|
3286
3313
|
const partition = indexes.get(indexName)?.partitions.get(partitionId);
|
|
@@ -3324,6 +3351,7 @@ function createDurabilityManager(config, hooks, directoryOverride) {
|
|
|
3324
3351
|
}
|
|
3325
3352
|
},
|
|
3326
3353
|
async removeIndex(indexName) {
|
|
3354
|
+
hooks.writeRecords?.dropIndex(indexName);
|
|
3327
3355
|
const indexState = indexes.get(indexName);
|
|
3328
3356
|
if (indexState !== void 0) {
|
|
3329
3357
|
await drainIndexStateForUnload(indexState, metadataWrites.get(indexName), closeWriterReportingFailure);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { spawnNodeWorker } from './chunk-HOZW3PKP.mjs';
|
|
2
|
-
import { VECTOR_WORKER_COPIES_ALLOWED, openSharedQuantizer, STORE_ORDINAL_LAYOUT_GENERATION, searchOrdinals, insertNode, GRAPH_RETIRED, nodeCountOf, tombstoneCountOf, DEFAULT_PROMOTION_THRESHOLD, DEFAULT_FILTER_THRESHOLD, osqBitsOf, noBuildHistory, createOsqQuantizer, recordCheckpoint, planCheckpoint, deserialize, assignStorePartitions, liveSize, ordinalFilterForSubsets, ordinalFilterValues, handOverBuildTurns, threadsHoldCurrentLayout, filterForOptions, openGraphState, STORE_UNPLACED_COUNT, STORE_LIVE_COUNT, STORE_REMOVED_COUNT, fixedView, OSQ4_MIN_DIMENSION, sharedVectorStoreBytes, STORE_SLOTS, IN_MEMORY, resetStoreHeader, STORE_RELEASED_VECTORS_TO_DISK, magnitude, emptyFieldBeforeRestore, ESTIMATED_MS_PER_TOMBSTONE, graphNeedsRebuild, ESTIMATED_MS_PER_VECTOR_REBUILD, releaseReplacedVectors, yieldBuildTurn, createOrdinalFilter, addToOrdinalFilter, nativeScoresOf, toScore, ordinalFilterHas, WORKER_COPY_MIN_VECTORS, allLiveDocIds, openVectorBlock, NOTHING_STAGED, arenaFloat32Distance, slotByteOffset, detachNativeStore, STORE_BLOCK_COUNT, STORE_CODE_BLOCK_COUNT, createSharedVectorStoreHandles, BLOCK_MAX_BYTES, growBufferTo, unplacedChunkCount, STORE_DOC_ID_BYTES, recalibrateFromStore, signatureOf, nativeStoreScratchBytes, noteFallback, toDistance, euclideanDistance, dotProduct, cosineSimilarityWithMagnitudes, QUERY_STAGED, createVectorBlock, ensureBlockSlots, createHNSWIndex, adoptGraph, topLayerInParts, BUILD_RETRY_MAX_DELAY_MS, BUILD_RETRY_FIRST_DELAY_MS, fieldHandlesOf, sharedMemoryAvailable, requireWholeNeighbourLists, shuffleInPlace, createCentroidSums, liveOrdinals, RECALIBRATION_CHUNK_VECTORS, BUILD_CHUNK_SIZE, centroidOfCentroidSums, meanOfCentroidSums, countOfCentroidSums, squaredLengthsOfCentroidSums, releaseLocksHeldBy, DRIFT_CHECK_GROWTH_FACTOR, DISK_ADOPTION_YIELD_INTERVAL, adoptLoadedCalibration, RECALIBRATION_DRIFT_RATIO } from './chunk-
|
|
3
|
-
export { releaseLocksHeldBy } from './chunk-
|
|
4
|
-
import { isDead, NO_LIVE_VECTOR_AT_POSITION, bytesToVectors } from './chunk-
|
|
5
|
-
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-
|
|
6
|
-
import { NarsilError, ErrorCodes, isNarsilError } from './chunk-
|
|
2
|
+
import { VECTOR_WORKER_COPIES_ALLOWED, openSharedQuantizer, STORE_ORDINAL_LAYOUT_GENERATION, searchOrdinals, insertNode, GRAPH_RETIRED, nodeCountOf, tombstoneCountOf, DEFAULT_PROMOTION_THRESHOLD, DEFAULT_FILTER_THRESHOLD, osqBitsOf, noBuildHistory, createOsqQuantizer, recordCheckpoint, planCheckpoint, deserialize, assignStorePartitions, liveSize, ordinalFilterForSubsets, ordinalFilterValues, handOverBuildTurns, threadsHoldCurrentLayout, filterForOptions, openGraphState, STORE_UNPLACED_COUNT, STORE_LIVE_COUNT, STORE_REMOVED_COUNT, fixedView, OSQ4_MIN_DIMENSION, sharedVectorStoreBytes, STORE_SLOTS, IN_MEMORY, resetStoreHeader, STORE_RELEASED_VECTORS_TO_DISK, magnitude, emptyFieldBeforeRestore, ESTIMATED_MS_PER_TOMBSTONE, graphNeedsRebuild, ESTIMATED_MS_PER_VECTOR_REBUILD, releaseReplacedVectors, yieldBuildTurn, createOrdinalFilter, addToOrdinalFilter, nativeScoresOf, toScore, ordinalFilterHas, WORKER_COPY_MIN_VECTORS, allLiveDocIds, openVectorBlock, NOTHING_STAGED, arenaFloat32Distance, slotByteOffset, detachNativeStore, STORE_BLOCK_COUNT, STORE_CODE_BLOCK_COUNT, createSharedVectorStoreHandles, BLOCK_MAX_BYTES, growBufferTo, unplacedChunkCount, STORE_DOC_ID_BYTES, recalibrateFromStore, signatureOf, nativeStoreScratchBytes, noteFallback, toDistance, euclideanDistance, dotProduct, cosineSimilarityWithMagnitudes, QUERY_STAGED, createVectorBlock, ensureBlockSlots, createHNSWIndex, adoptGraph, topLayerInParts, BUILD_RETRY_MAX_DELAY_MS, BUILD_RETRY_FIRST_DELAY_MS, fieldHandlesOf, sharedMemoryAvailable, requireWholeNeighbourLists, shuffleInPlace, createCentroidSums, liveOrdinals, RECALIBRATION_CHUNK_VECTORS, BUILD_CHUNK_SIZE, centroidOfCentroidSums, meanOfCentroidSums, countOfCentroidSums, squaredLengthsOfCentroidSums, releaseLocksHeldBy, DRIFT_CHECK_GROWTH_FACTOR, DISK_ADOPTION_YIELD_INTERVAL, adoptLoadedCalibration, RECALIBRATION_DRIFT_RATIO } from './chunk-OVY4RPDS.mjs';
|
|
3
|
+
export { releaseLocksHeldBy } from './chunk-OVY4RPDS.mjs';
|
|
4
|
+
import { isDead, NO_LIVE_VECTOR_AT_POSITION, bytesToVectors } from './chunk-P7C2S5JX.mjs';
|
|
5
|
+
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-2CBQ2PCC.mjs';
|
|
6
|
+
import { NarsilError, ErrorCodes, isNarsilError } from './chunk-LJS6PREA.mjs';
|
|
7
7
|
|
|
8
8
|
// src/core/heap.ts
|
|
9
9
|
function createMaxHeap(compare) {
|
|
@@ -18,7 +18,7 @@ function restoreDepsOf(core, host) {
|
|
|
18
18
|
function queueRestore(core, host, restoresInFlight, indexName, data) {
|
|
19
19
|
const previous = restoresInFlight.get(indexName) ?? Promise.resolve();
|
|
20
20
|
const restored = previous.then(async () => {
|
|
21
|
-
const { restoreFromSnapshot } = await import('./snapshot-
|
|
21
|
+
const { restoreFromSnapshot } = await import('./snapshot-BU6I25CW.mjs');
|
|
22
22
|
await restoreFromSnapshot(indexName, data, restoreDepsOf(core, host));
|
|
23
23
|
});
|
|
24
24
|
const settled = restored.then(
|
|
@@ -1,5 +1,5 @@
|
|
|
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 { NarsilError, ErrorCodes, MIN_HYBRID_DEPTH, MAX_HYBRID_DEPTH, HYBRID_RESCORE_WINDOW, DEFAULT_LIMIT, DEFAULT_OFFSET, RESULT_WINDOW } from './chunk-
|
|
2
|
+
import { NarsilError, ErrorCodes, MIN_HYBRID_DEPTH, MAX_HYBRID_DEPTH, HYBRID_RESCORE_WINDOW, DEFAULT_LIMIT, DEFAULT_OFFSET, RESULT_WINDOW } from './chunk-LJS6PREA.mjs';
|
|
3
3
|
|
|
4
4
|
// src/search/hybrid-depth.ts
|
|
5
5
|
function fixedHybridDepthOf(hybrid) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { vectorsPerFile } from './chunk-
|
|
2
|
-
import { indexMetadataOf, writeCheckpointSegments, DEFAULT_COMPACTION_THRESHOLD, writeLiveVectors, commitCheckpointManifest, manifestKey, decodeSegmentManifest, SINGLE_NODE_PRIMARY_TERM, partitionContentsOf, manifestFileRefs, unpackIndexSnapshotEnvelope, encodeSegmentManifest, loadSegmentedCheckpoint, writeMetadataEnvelope, openManifestPayload, listedKeysOf, decodeManifestPayload, readSegmentFile, readVectorFile, readGraphParts, documentsOfPayloadV2, deserializePayloadV1 } from './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import { encodeIndexConfiguration, createByteReader, hasNrslMagic, HEADER_SIZE, readHeader, raiseEarlierReleaseGraphSetting, restoredConfigFields, restoredEmbedding, getLanguage, validateSchema, validatePatternValueLimit, requireSurfaceFormsForPartialFields, validateVectorPromotion, validateVectorStorage, validateRequiredFieldsInSchema, resolveIndexAnalysis, validateEmbeddingConfig, prepareStoredSynonyms, rejectSnapshot, readHeapStatistics, readResidentMemory, extractVectorFieldsFromSchema, loadVectorCodeFor, decodeEveryStoredDocument, parseVectorDimension, insertDocumentVectors, decodeIndexConfiguration, flattenSchema } from './chunk-
|
|
5
|
-
import { decodeVectorIndexParts, vectorsToBytes, VECTOR_FILE_PAYLOAD_VERSION, bytesToVectors } from './chunk-
|
|
6
|
-
import { MAX_FILE_BYTES } from './chunk-
|
|
1
|
+
import { vectorsPerFile } from './chunk-OVY4RPDS.mjs';
|
|
2
|
+
import { indexMetadataOf, writeCheckpointSegments, DEFAULT_COMPACTION_THRESHOLD, writeLiveVectors, commitCheckpointManifest, manifestKey, decodeSegmentManifest, SINGLE_NODE_PRIMARY_TERM, partitionContentsOf, manifestFileRefs, unpackIndexSnapshotEnvelope, encodeSegmentManifest, loadSegmentedCheckpoint, writeMetadataEnvelope, openManifestPayload, listedKeysOf, decodeManifestPayload, readSegmentFile, readVectorFile, readGraphParts, documentsOfPayloadV2, deserializePayloadV1 } from './chunk-6YUUEMQ4.mjs';
|
|
3
|
+
import './chunk-5BQPBG3G.mjs';
|
|
4
|
+
import { encodeIndexConfiguration, createByteReader, hasNrslMagic, HEADER_SIZE, readHeader, raiseEarlierReleaseGraphSetting, restoredConfigFields, restoredEmbedding, getLanguage, validateSchema, validatePatternValueLimit, requireSurfaceFormsForPartialFields, validateVectorPromotion, validateVectorStorage, validateRequiredFieldsInSchema, resolveIndexAnalysis, validateEmbeddingConfig, prepareStoredSynonyms, rejectSnapshot, readHeapStatistics, readResidentMemory, extractVectorFieldsFromSchema, loadVectorCodeFor, decodeEveryStoredDocument, parseVectorDimension, insertDocumentVectors, decodeIndexConfiguration, flattenSchema } from './chunk-HQOYKRMB.mjs';
|
|
5
|
+
import { decodeVectorIndexParts, vectorsToBytes, VECTOR_FILE_PAYLOAD_VERSION, bytesToVectors } from './chunk-P7C2S5JX.mjs';
|
|
6
|
+
import { MAX_FILE_BYTES } from './chunk-2CBQ2PCC.mjs';
|
|
7
7
|
import './chunk-JPTQZWJQ.mjs';
|
|
8
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
8
|
+
import { NarsilError, ErrorCodes } from './chunk-LJS6PREA.mjs';
|
|
9
9
|
import { decode } from '@msgpack/msgpack';
|
|
10
10
|
|
|
11
11
|
// src/persistence/archive/memory-store.ts
|
|
@@ -79,12 +79,24 @@ function partitionVectorPlan(vectorIndex, docIds) {
|
|
|
79
79
|
}
|
|
80
80
|
function capture(input) {
|
|
81
81
|
const partitionIds = input.partitionId === null ? Array.from({ length: input.manager.partitionCount }, (_, partitionId) => partitionId) : [input.partitionId];
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
82
|
+
const { indexName } = input;
|
|
83
|
+
const writeRecords = input.writeRecords ?? null;
|
|
84
|
+
const targets = partitionIds.map((partitionId) => {
|
|
85
|
+
const target = {
|
|
86
|
+
partitionId,
|
|
87
|
+
lastSeqNo: input.appliedSeqNo(partitionId),
|
|
88
|
+
primaryTerm: SINGLE_NODE_PRIMARY_TERM
|
|
89
|
+
};
|
|
90
|
+
if (writeRecords !== null) target.termHistory = writeRecords.termHistoryOf(indexName, partitionId, target.lastSeqNo);
|
|
91
|
+
return target;
|
|
92
|
+
});
|
|
93
|
+
const contents = partitionIds.map(
|
|
94
|
+
(partitionId) => partitionContentsOf(
|
|
95
|
+
input.manager,
|
|
96
|
+
partitionId,
|
|
97
|
+
writeRecords === null ? void 0 : (segments) => writeRecords.captureSegments(indexName, partitionId, segments)
|
|
98
|
+
)
|
|
99
|
+
);
|
|
88
100
|
const plans = /* @__PURE__ */ new Map();
|
|
89
101
|
const partitionDocIds = input.partitionId === null ? null : [...input.manager.getPartition(input.partitionId).docIds()];
|
|
90
102
|
for (const [fieldPath, vectorIndex] of input.vectorIndexes) {
|
|
@@ -107,7 +119,8 @@ async function buildArchiveFromMemory(input) {
|
|
|
107
119
|
targets: captured.targets,
|
|
108
120
|
compactionThreshold: DEFAULT_COMPACTION_THRESHOLD,
|
|
109
121
|
prior: null,
|
|
110
|
-
wholePartitions: captured.contents
|
|
122
|
+
wholePartitions: captured.contents,
|
|
123
|
+
keepsWriteRecords: input.writeRecords != null
|
|
111
124
|
});
|
|
112
125
|
const vectors = await writeLiveVectors({ store, indexName: input.indexName, plans: captured.plans, priorVectors: [] });
|
|
113
126
|
const refs = vectors.refs;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { setNestedValue, KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment } from './chunk-
|
|
2
|
-
import { decodeStoredDocument, openChecksummedEnvelope, NUMBER_TAG, DATE_TAG, BYTES_TAG, encodeBase64, startsWithTagPrefix, OBJECT_TAG, MILLISECONDS_PER_SECOND, NANOSECONDS_PER_MILLISECOND, DOCUMENT_EXPORT_VERSION, DOCUMENT_EXPORT_FORMAT } from './chunk-
|
|
3
|
-
import { decodeVectorFilePayload, isDead, bytesToVectors } from './chunk-
|
|
4
|
-
import './chunk-
|
|
1
|
+
import { setNestedValue, KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment } from './chunk-5BQPBG3G.mjs';
|
|
2
|
+
import { decodeStoredDocument, openChecksummedEnvelope, NUMBER_TAG, DATE_TAG, BYTES_TAG, encodeBase64, startsWithTagPrefix, OBJECT_TAG, MILLISECONDS_PER_SECOND, NANOSECONDS_PER_MILLISECOND, DOCUMENT_EXPORT_VERSION, DOCUMENT_EXPORT_FORMAT } from './chunk-HQOYKRMB.mjs';
|
|
3
|
+
import { decodeVectorFilePayload, isDead, bytesToVectors } from './chunk-P7C2S5JX.mjs';
|
|
4
|
+
import './chunk-2CBQ2PCC.mjs';
|
|
5
5
|
import './chunk-JPTQZWJQ.mjs';
|
|
6
|
-
import { EXPORT_CHUNK_BYTES, NarsilError, ErrorCodes } from './chunk-
|
|
6
|
+
import { EXPORT_CHUNK_BYTES, NarsilError, ErrorCodes } from './chunk-LJS6PREA.mjs';
|
|
7
7
|
import { decode } from '@msgpack/msgpack';
|
|
8
8
|
|
|
9
9
|
// src/engine/export/json-line.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { E as EmbeddingAdapter, R as RerankAdapter } from './adapters-BQFQ4PRz.js';
|
|
2
|
-
import { C as ClusterNamespace } from './config-
|
|
3
|
-
import { h as TaskStore } from './tasks-
|
|
2
|
+
import { C as ClusterNamespace } from './config-ujZESkJz.js';
|
|
3
|
+
import { h as TaskStore } from './tasks-CI3Fvkxw.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Context handed to {@link OnRequestHook} for every inbound request, captured
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MIN_HYBRID_DEPTH, MAX_HYBRID_DEPTH } from './chunk-E74YLAIG.mjs';
|
|
2
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
2
|
+
import { NarsilError, ErrorCodes } from './chunk-OBWUWZRA.mjs';
|
|
3
3
|
|
|
4
4
|
// src/search/hybrid-depth.ts
|
|
5
5
|
function fixedHybridDepthOf(hybrid) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { readRecentMemoryFigures, readMemoryFigures, collectGarbageBeforeRefusal, collectYoungGenerationBeforeRefusal, reportRefusalAfterCollection, answerRefusalOf, reservedHeapBytes, admitHeapBytes } from './chunk-
|
|
1
|
+
import { readRecentMemoryFigures, readMemoryFigures, collectGarbageBeforeRefusal, collectYoungGenerationBeforeRefusal, reportRefusalAfterCollection, answerRefusalOf, reservedHeapBytes, admitHeapBytes } from './chunk-V7G627TA.mjs';
|
|
2
2
|
import { nativeSearchCoreIsEnabled } from './chunk-DJHHF2L5.mjs';
|
|
3
3
|
import { DEFAULT_RERANK_WINDOW } from './chunk-HJSN7UYG.mjs';
|
|
4
|
-
import { loadNativeCore } from './chunk-
|
|
4
|
+
import { loadNativeCore } from './chunk-VK45J47R.mjs';
|
|
5
5
|
import { MAX_FILTER_DEPTH } from './chunk-WQBCBKY3.mjs';
|
|
6
6
|
import { MAX_SORT_FIELDS } from './chunk-E74YLAIG.mjs';
|
|
7
7
|
import { HEAP_BLOCK_FRACTION_BELOW_V8_INEFFECTIVE_MARK_COMPACT_LINE } from './chunk-ZXZ26WSO.mjs';
|
|
8
|
-
import { NarsilError, ServerErrorCodes, ErrorCodes } from './chunk-
|
|
8
|
+
import { NarsilError, ServerErrorCodes, ErrorCodes } from './chunk-OBWUWZRA.mjs';
|
|
9
9
|
import { randomUUID } from 'crypto';
|
|
10
10
|
import { mkdtemp, open, rm } from 'fs/promises';
|
|
11
11
|
import { tmpdir } from 'os';
|
|
@@ -218,6 +218,7 @@ var STATUS_BY_CODE = {
|
|
|
218
218
|
REPLICATION_INSYNC_REMOVAL_FAILED: 503,
|
|
219
219
|
REPLICATION_ROLLBACK_FAILED: 503,
|
|
220
220
|
REPLICATION_OUTCOME_UNKNOWN: 503,
|
|
221
|
+
REPLICATION_WRITE_CONFLICT: 409,
|
|
221
222
|
REPLICATION_LOG_FULL: 503,
|
|
222
223
|
REPLICATION_ENTRY_CORRUPT: 503,
|
|
223
224
|
REPLICATION_SNAPSHOT_CORRUPT: 503,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PARSED_FIELD_TYPE_CACHE_ENTRIES, VECTOR_PATTERN, MAX_STORED_VECTOR_DIMENSION } from './chunk-L5ORED7V.mjs';
|
|
2
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
2
|
+
import { NarsilError, ErrorCodes } from './chunk-OBWUWZRA.mjs';
|
|
3
3
|
|
|
4
4
|
// src/schema/validator/field-type.ts
|
|
5
5
|
var FIELD_OPTION_ORDER = ["sortable", "pattern", "partial"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SCRATCH_SLOTS_PER_THREAD_POOL } from './chunk-QSK35UC2.mjs';
|
|
2
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
2
|
+
import { NarsilError, ErrorCodes } from './chunk-OBWUWZRA.mjs';
|
|
3
3
|
|
|
4
4
|
// src/workers/constants.ts
|
|
5
5
|
var WORKER_YOUNG_GENERATION_MB = 24;
|