@delali/narsil 0.3.1-next.111 → 0.3.1-next.113
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/browser/{chunk-6YUUEMQ4.mjs → chunk-3YPLBK4C.mjs} +2 -2
- package/dist/browser/{chunk-5BQPBG3G.mjs → chunk-4FVSBSXY.mjs} +1 -1
- package/dist/browser/{chunk-HQOYKRMB.mjs → chunk-DC2SZO4D.mjs} +183 -44
- package/dist/browser/{chunk-OVY4RPDS.mjs → chunk-YZPOBLAS.mjs} +35 -1
- package/dist/browser/{durability-wiring-CYAJBYCO.mjs → durability-wiring-2RG22WQJ.mjs} +3 -3
- package/dist/browser/{module-DYKR4INA.mjs → module-5EWHBKHZ.mjs} +102 -11
- package/dist/browser/{restore-queue-RTZGJT4D.mjs → restore-queue-WCFUB4NS.mjs} +1 -1
- package/dist/browser/{snapshot-BU6I25CW.mjs → snapshot-BE3F2PNC.mjs} +6 -5
- package/dist/browser/{write-RUPYHPBZ.mjs → write-MV7K7OCU.mjs} +2 -2
- package/dist/{capabilities-ByaX8Arf.d.ts → capabilities-DOgB3pPf.d.ts} +2 -2
- package/dist/{chunk-ZXZ26WSO.mjs → chunk-22YPZVMG.mjs} +5 -1
- package/dist/{chunk-6S7YRUPQ.mjs → chunk-27ZEY73B.mjs} +4 -4
- package/dist/{chunk-QI6JW4PM.mjs → chunk-4PFOOQFQ.mjs} +1 -1
- package/dist/{chunk-YIDSHBQS.mjs → chunk-4XWIW3F3.mjs} +29 -1
- package/dist/{chunk-R2MRMH6M.mjs → chunk-5QIRLJH4.mjs} +3 -3
- package/dist/{chunk-7JOONQ24.mjs → chunk-5WEBVYOA.mjs} +176 -38
- package/dist/{chunk-63HFWQEA.mjs → chunk-AOLD3LPV.mjs} +273 -102
- package/dist/{chunk-PT7VRWS7.mjs → chunk-CU4OB64V.mjs} +3 -2
- package/dist/{chunk-JBPYFYIU.mjs → chunk-DZXGNLK5.mjs} +3 -3
- package/dist/chunk-EBIHRL7B.mjs +21 -0
- package/dist/{chunk-UGKO3RG2.mjs → chunk-GLZI636G.mjs} +1 -1
- package/dist/{chunk-R2MRGYU5.mjs → chunk-H2GNWBLB.mjs} +22 -2
- package/dist/{chunk-V7G627TA.mjs → chunk-HFJXEFFV.mjs} +13 -62
- package/dist/chunk-IWVEG5CX.mjs +67 -0
- package/dist/{chunk-SXVDBHYJ.mjs → chunk-JUAFWJON.mjs} +3 -3
- package/dist/{chunk-PKE2PCTS.mjs → chunk-LVNBY2TS.mjs} +1 -1
- package/dist/{chunk-YLE75NQ5.mjs → chunk-OABTAUCW.mjs} +2 -2
- package/dist/{chunk-YSR5L3XJ.mjs → chunk-OM5G2J6X.mjs} +1 -1
- package/dist/{chunk-IW6UR3AF.mjs → chunk-PABYSTKO.mjs} +13 -10
- package/dist/chunk-PELHVTO7.mjs +24 -0
- package/dist/{chunk-CUVTRLA4.mjs → chunk-QGVMEMCG.mjs} +4 -4
- package/dist/{chunk-6OXNHLNZ.mjs → chunk-RIIUZJQ3.mjs} +1 -1
- package/dist/{chunk-C7SLA6CM.mjs → chunk-W55X2BYN.mjs} +5 -1
- package/dist/{chunk-SOADQINJ.mjs → chunk-ZATRDAYU.mjs} +31 -3
- package/dist/{client-BdnzDFtO.d.ts → client-BGzLNt78.d.ts} +2 -2
- package/dist/client.d.ts +6 -6
- package/dist/{config-ujZESkJz.d.ts → config-CS5ADSrx.d.ts} +18 -2
- package/dist/{config-CSgvApt0.d.ts → config-CSYMTTm1.d.ts} +1 -1
- package/dist/{direct-executor-QFAUKTCQ.mjs → direct-executor-R4HOSVPE.mjs} +6 -5
- package/dist/distribution.d.ts +5 -5
- package/dist/distribution.mjs +74 -37
- package/dist/{durability-wiring-NUHTYXHA.mjs → durability-wiring-XZI6355I.mjs} +15 -14
- package/dist/{engine-C_HSy3iz.d.ts → engine-CCBBGmMR.d.ts} +1 -1
- package/dist/{events-CJsXF1F9.d.ts → events-D8GPB1-H.d.ts} +5 -0
- package/dist/index.browser.mjs +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.mjs +8 -7
- package/dist/{module-WP4VVGV2.mjs → module-WVKSJL74.mjs} +67 -7
- package/dist/persistence/durability/checkpoint-worker.mjs +12 -11
- package/dist/react.d.ts +6 -6
- package/dist/{restore-queue-QSLGXZJB.mjs → restore-queue-JAZAB5IQ.mjs} +1 -1
- package/dist/server.d.ts +8 -8
- package/dist/server.mjs +20 -62
- package/dist/{snapshot-IV3S2TMI.mjs → snapshot-PDUGHQ25.mjs} +16 -15
- package/dist/{tasks-CI3Fvkxw.d.ts → tasks-5_LCFEzF.d.ts} +1 -1
- package/dist/{thread-THLCKMEB.mjs → thread-S4SUCV4Y.mjs} +10 -7
- package/dist/vector/search-worker.mjs +2 -2
- package/dist/workers/entry.mjs +6 -6
- package/dist/{write-VGRTOS7N.mjs → write-KVJ7YJJ6.mjs} +9 -8
- package/package.json +7 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { admittedHeapBytes, collectGarbageBeforeAnswerRefusal, collectYoungGenerationBeforeRefusal, reservedHeapBytes, admitHeapBytes } from './chunk-IWVEG5CX.mjs';
|
|
2
|
+
import { readOldGenerationStatistics, processLimitBytes } from './chunk-ZATRDAYU.mjs';
|
|
3
|
+
import { engineThreadYoungGenerationBytes } from './chunk-EBIHRL7B.mjs';
|
|
4
4
|
import { NarsilError, ErrorCodes, ServerErrorCodes } from './chunk-OBWUWZRA.mjs';
|
|
5
5
|
|
|
6
6
|
// src/distribution/cluster-node/constants.ts
|
|
@@ -89,61 +89,6 @@ var FETCH_GROUP_DOCUMENT_IDS = 256;
|
|
|
89
89
|
var SEARCH_CONTEXT_REAPER_INTERVAL_MS = 1e3;
|
|
90
90
|
var SEARCH_CONTEXT_ENTRY_HEAP_BYTES = 256;
|
|
91
91
|
|
|
92
|
-
// src/runtime/thread-heap.ts
|
|
93
|
-
var refusalListeners = /* @__PURE__ */ new Set();
|
|
94
|
-
var reservedBytes = 0;
|
|
95
|
-
var admittedBytes = 0;
|
|
96
|
-
var lastRefusalCollectionAt = Number.NEGATIVE_INFINITY;
|
|
97
|
-
var refusalCollectionIntervalMs = REFUSAL_COLLECTION_MIN_INTERVAL_MS;
|
|
98
|
-
var lastYoungCollectionAt = Number.NEGATIVE_INFINITY;
|
|
99
|
-
function reservedHeapBytes() {
|
|
100
|
-
return reservedBytes;
|
|
101
|
-
}
|
|
102
|
-
function admittedHeapBytes() {
|
|
103
|
-
return admittedBytes;
|
|
104
|
-
}
|
|
105
|
-
function admitHeapBytes(bytes) {
|
|
106
|
-
admittedBytes += bytes;
|
|
107
|
-
}
|
|
108
|
-
function reserveHeapBytes(bytes) {
|
|
109
|
-
reservedBytes += bytes;
|
|
110
|
-
admittedBytes += bytes;
|
|
111
|
-
let released = false;
|
|
112
|
-
return {
|
|
113
|
-
release() {
|
|
114
|
-
if (released) return;
|
|
115
|
-
released = true;
|
|
116
|
-
reservedBytes -= bytes;
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
function onRefusalAfterCollection(listener) {
|
|
121
|
-
refusalListeners.add(listener);
|
|
122
|
-
return () => {
|
|
123
|
-
refusalListeners.delete(listener);
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
function reportRefusalAfterCollection(figures) {
|
|
127
|
-
for (const listener of refusalListeners) listener(figures);
|
|
128
|
-
}
|
|
129
|
-
function collectGarbageBeforeRefusal() {
|
|
130
|
-
const startedAt = performance.now();
|
|
131
|
-
if (startedAt - lastRefusalCollectionAt < refusalCollectionIntervalMs) return false;
|
|
132
|
-
lastRefusalCollectionAt = startedAt;
|
|
133
|
-
if (!collectAndReturnPages()) return false;
|
|
134
|
-
refusalCollectionIntervalMs = Math.max(
|
|
135
|
-
REFUSAL_COLLECTION_MIN_INTERVAL_MS,
|
|
136
|
-
(performance.now() - startedAt) * REFUSAL_COLLECTION_TIME_MULTIPLE
|
|
137
|
-
);
|
|
138
|
-
return true;
|
|
139
|
-
}
|
|
140
|
-
function collectYoungGenerationBeforeRefusal() {
|
|
141
|
-
const startedAt = performance.now();
|
|
142
|
-
if (startedAt - lastYoungCollectionAt < REFUSAL_YOUNG_COLLECTION_MIN_INTERVAL_MS) return false;
|
|
143
|
-
lastYoungCollectionAt = startedAt;
|
|
144
|
-
return collectYoungGeneration();
|
|
145
|
-
}
|
|
146
|
-
|
|
147
92
|
// src/distribution/cluster-node/memory/measure.ts
|
|
148
93
|
var lastFigures = null;
|
|
149
94
|
var lastFiguresReadAt = Number.NEGATIVE_INFINITY;
|
|
@@ -154,7 +99,9 @@ var recentFigures = {
|
|
|
154
99
|
heapBytes: 0,
|
|
155
100
|
heapLimitBytes: 0,
|
|
156
101
|
youngHeapBytes: 0,
|
|
157
|
-
heapCommittedBytes: 0
|
|
102
|
+
heapCommittedBytes: 0,
|
|
103
|
+
youngCeilingBytes: 0,
|
|
104
|
+
youngReserveBytes: 0
|
|
158
105
|
};
|
|
159
106
|
function readFreshFigures() {
|
|
160
107
|
try {
|
|
@@ -170,7 +117,9 @@ function readFreshFigures() {
|
|
|
170
117
|
heapBytes: heap.usedBytes,
|
|
171
118
|
heapLimitBytes: heap.limitBytes,
|
|
172
119
|
youngHeapBytes: heap.youngUsedBytes,
|
|
173
|
-
heapCommittedBytes: Math.max(heap.committedBytes, heap.usedBytes)
|
|
120
|
+
heapCommittedBytes: Math.max(heap.committedBytes, heap.usedBytes),
|
|
121
|
+
youngCeilingBytes: heap.youngCeilingBytes,
|
|
122
|
+
youngReserveBytes: heap.youngReserveBytes + engineThreadYoungGenerationBytes()
|
|
174
123
|
};
|
|
175
124
|
} catch {
|
|
176
125
|
return null;
|
|
@@ -194,6 +143,8 @@ function readRecentMemoryFigures() {
|
|
|
194
143
|
recentFigures.heapBytes = lastFigures.heapBytes + admittedSince;
|
|
195
144
|
recentFigures.youngHeapBytes = lastFigures.youngHeapBytes;
|
|
196
145
|
recentFigures.heapCommittedBytes = lastFigures.heapCommittedBytes + admittedSince;
|
|
146
|
+
recentFigures.youngCeilingBytes = lastFigures.youngCeilingBytes;
|
|
147
|
+
recentFigures.youngReserveBytes = lastFigures.youngReserveBytes;
|
|
197
148
|
return recentFigures;
|
|
198
149
|
}
|
|
199
150
|
|
|
@@ -334,7 +285,7 @@ function answerRefusalOf(answerBytes) {
|
|
|
334
285
|
if (recent === null || answerBytes <= roomIn(recent)) return admitted(answerBytes);
|
|
335
286
|
const figures = readMemoryFigures() ?? recent;
|
|
336
287
|
if (answerBytes <= roomIn(figures)) return admitted(answerBytes);
|
|
337
|
-
const collectedGarbage =
|
|
288
|
+
const collectedGarbage = collectGarbageBeforeAnswerRefusal();
|
|
338
289
|
const collectedYoung = !collectedGarbage && collectYoungGenerationBeforeRefusal();
|
|
339
290
|
const settled = collectedGarbage || collectedYoung ? readMemoryFigures() ?? figures : figures;
|
|
340
291
|
if (answerBytes <= roomIn(settled)) return admitted(answerBytes);
|
|
@@ -347,4 +298,4 @@ function refuseEncodeWithoutRoom(documents) {
|
|
|
347
298
|
if (refusal2 !== null) throw refusal2;
|
|
348
299
|
}
|
|
349
300
|
|
|
350
|
-
export { ADMISSION_TIMEOUT_MS, ANSWER_DECODE_HEAP_BYTES_PER_PAYLOAD_BYTE, CASE_FOLD_EXPANSION_FACTOR, CATCH_UP_FEED_WINDOW_MS, CATCH_UP_TICK_MS, CLEAR_PAGE_SIZE, COORDINATOR_REQUEST_BUCKET_BOUNDS_SECONDS, COPY_FAILURE_ATTEMPTS, COPY_FAILURE_RETRY_DELAY_MS, DECOMMISSION_RECHECK_INTERVAL_MS, DEFAULT_BLOCK_WRITES_ABOVE, DEFAULT_BOOTSTRAP_SYNC_DEADLINE_MS, DEFAULT_CAPACITY, DEFAULT_CREATE_INDEX_WAIT_MS, DEFAULT_IN_FLIGHT_WRITE_FRACTION, DEFAULT_MAX_PER_SOURCE_SNAPSHOTS, DEFAULT_MAX_STREAMS_PER_INDEX, DEFAULT_PARTITION_COUNT, DEFAULT_REPLICATION_FACTOR, DEFAULT_RESUME_WRITES_BELOW, DISTINCT_TERM_HEAP_BYTES, DOCUMENT_HEAP_BYTES_PER_ESTIMATED_BYTE, DOCUMENT_PROPERTY_HEAP_BYTES, DOCUMENT_VALUE_HEAP_BYTES, DROP_ACKNOWLEDGE_POLL_INTERVAL_MS, ENUM_VALUE_HEAP_BYTES, FETCH_GROUP_DOCUMENT_IDS, FORWARD_RETRY_DELAY_CAP_MS, FORWARD_RETRY_INITIAL_DELAY_MS, FULL_MEMORY_COLLECTION_INTERVAL_MS, MAX_CATCH_UP_IN_FLIGHT_BYTES, MAX_DROP_ACKNOWLEDGE_WAIT_MS, MAX_NODE_LEFT_DELAY_MS, MAX_SOURCE_ID_LENGTH, MAX_SYNONYM_REPLACEMENT_ATTEMPTS, MAX_WAIT_FOR_ACTIVE_REPLICAS, MEMORY_SAMPLE_INTERVAL_MS, MIN_CONTROLLER_LEASE_TTL_MS, NORMALIZATION_EXPANSION_FACTOR, PARTIAL_SPELLING_HEAP_BYTES, PARTITION_BYTES_ENTRY_BYTES, PARTITION_BYTES_INDEX_OVERHEAD_BYTES, PARTITION_BYTES_REPORT_BUDGET_BYTES, PARTITION_WRITE_CONCURRENCY, PATTERN_RUN_HEAP_BYTES, PRIMARY_CHANGE_POLL_INTERVAL_MS, PRIMARY_CHANGE_RETRY_WINDOW_MS, REGISTRATION_LEASE_CONFIRM_TIMEOUT_MS, REGISTRATION_LEASE_DRIFT_SHARE, ROLLBACK_RETRY_DELAY_CAP_MS, ROLLBACK_RETRY_INITIAL_DELAY_MS, SEARCH_CONTEXT_ENTRY_HEAP_BYTES, SEARCH_CONTEXT_REAPER_INTERVAL_MS, SNAPSHOT_CHUNK_YIELD_INTERVAL_MS, SYNCED_POSITION_REPORT_TIMEOUT_MS, TERM_UNIT_HEAP_BYTES, VECTOR_COMPONENT_HEAP_BYTES, VECTOR_DOCUMENT_HEAP_BYTES, WRITE_APPLY_YIELD_INTERVAL_MS, WRITE_MEMORY_SAMPLE_MAX_AGE_MS,
|
|
301
|
+
export { ADMISSION_TIMEOUT_MS, ANSWER_DECODE_HEAP_BYTES_PER_PAYLOAD_BYTE, CASE_FOLD_EXPANSION_FACTOR, CATCH_UP_FEED_WINDOW_MS, CATCH_UP_TICK_MS, CLEAR_PAGE_SIZE, COORDINATOR_REQUEST_BUCKET_BOUNDS_SECONDS, COPY_FAILURE_ATTEMPTS, COPY_FAILURE_RETRY_DELAY_MS, DECOMMISSION_RECHECK_INTERVAL_MS, DEFAULT_BLOCK_WRITES_ABOVE, DEFAULT_BOOTSTRAP_SYNC_DEADLINE_MS, DEFAULT_CAPACITY, DEFAULT_CREATE_INDEX_WAIT_MS, DEFAULT_IN_FLIGHT_WRITE_FRACTION, DEFAULT_MAX_PER_SOURCE_SNAPSHOTS, DEFAULT_MAX_STREAMS_PER_INDEX, DEFAULT_PARTITION_COUNT, DEFAULT_REPLICATION_FACTOR, DEFAULT_RESUME_WRITES_BELOW, DISTINCT_TERM_HEAP_BYTES, DOCUMENT_HEAP_BYTES_PER_ESTIMATED_BYTE, DOCUMENT_PROPERTY_HEAP_BYTES, DOCUMENT_VALUE_HEAP_BYTES, DROP_ACKNOWLEDGE_POLL_INTERVAL_MS, ENUM_VALUE_HEAP_BYTES, FETCH_GROUP_DOCUMENT_IDS, FORWARD_RETRY_DELAY_CAP_MS, FORWARD_RETRY_INITIAL_DELAY_MS, FULL_MEMORY_COLLECTION_INTERVAL_MS, MAX_CATCH_UP_IN_FLIGHT_BYTES, MAX_DROP_ACKNOWLEDGE_WAIT_MS, MAX_NODE_LEFT_DELAY_MS, MAX_SOURCE_ID_LENGTH, MAX_SYNONYM_REPLACEMENT_ATTEMPTS, MAX_WAIT_FOR_ACTIVE_REPLICAS, MEMORY_SAMPLE_INTERVAL_MS, MIN_CONTROLLER_LEASE_TTL_MS, NORMALIZATION_EXPANSION_FACTOR, PARTIAL_SPELLING_HEAP_BYTES, PARTITION_BYTES_ENTRY_BYTES, PARTITION_BYTES_INDEX_OVERHEAD_BYTES, PARTITION_BYTES_REPORT_BUDGET_BYTES, PARTITION_WRITE_CONCURRENCY, PATTERN_RUN_HEAP_BYTES, PRIMARY_CHANGE_POLL_INTERVAL_MS, PRIMARY_CHANGE_RETRY_WINDOW_MS, REGISTRATION_LEASE_CONFIRM_TIMEOUT_MS, REGISTRATION_LEASE_DRIFT_SHARE, ROLLBACK_RETRY_DELAY_CAP_MS, ROLLBACK_RETRY_INITIAL_DELAY_MS, SEARCH_CONTEXT_ENTRY_HEAP_BYTES, SEARCH_CONTEXT_REAPER_INTERVAL_MS, SNAPSHOT_CHUNK_YIELD_INTERVAL_MS, SYNCED_POSITION_REPORT_TIMEOUT_MS, TERM_UNIT_HEAP_BYTES, VECTOR_COMPONENT_HEAP_BYTES, VECTOR_DOCUMENT_HEAP_BYTES, WRITE_APPLY_YIELD_INTERVAL_MS, WRITE_MEMORY_SAMPLE_MAX_AGE_MS, answerRefusalOf, createWritePressure, estimateDocumentBytes, estimateDocumentsBytes, estimateForwardedBytes, readMemoryFigures, readRecentMemoryFigures, refuseEncodeWithoutRoom, withAdmittedWrite };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { collectYoungGeneration, collectAndReturnPages } from './chunk-RIIUZJQ3.mjs';
|
|
2
|
+
import { REFUSAL_YOUNG_COLLECTION_MIN_INTERVAL_MS, REFUSAL_COLLECTION_MIN_INTERVAL_MS, REFUSAL_COLLECTION_TIME_MULTIPLE } from './chunk-22YPZVMG.mjs';
|
|
3
|
+
|
|
4
|
+
// src/runtime/thread-heap.ts
|
|
5
|
+
var refusalListeners = /* @__PURE__ */ new Set();
|
|
6
|
+
var reservedBytes = 0;
|
|
7
|
+
var admittedBytes = 0;
|
|
8
|
+
var lastYoungCollectionAt = Number.NEGATIVE_INFINITY;
|
|
9
|
+
function reservedHeapBytes() {
|
|
10
|
+
return reservedBytes;
|
|
11
|
+
}
|
|
12
|
+
function admittedHeapBytes() {
|
|
13
|
+
return admittedBytes;
|
|
14
|
+
}
|
|
15
|
+
function admitHeapBytes(bytes) {
|
|
16
|
+
admittedBytes += bytes;
|
|
17
|
+
}
|
|
18
|
+
function chargeHeapBytes(bytes) {
|
|
19
|
+
reservedBytes += bytes;
|
|
20
|
+
if (bytes > 0) admittedBytes += bytes;
|
|
21
|
+
}
|
|
22
|
+
function reserveHeapBytes(bytes) {
|
|
23
|
+
reservedBytes += bytes;
|
|
24
|
+
admittedBytes += bytes;
|
|
25
|
+
let released = false;
|
|
26
|
+
return {
|
|
27
|
+
release() {
|
|
28
|
+
if (released) return;
|
|
29
|
+
released = true;
|
|
30
|
+
reservedBytes -= bytes;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function onRefusalAfterCollection(listener) {
|
|
35
|
+
refusalListeners.add(listener);
|
|
36
|
+
return () => {
|
|
37
|
+
refusalListeners.delete(listener);
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function reportRefusalAfterCollection(figures) {
|
|
41
|
+
for (const listener of refusalListeners) listener(figures);
|
|
42
|
+
}
|
|
43
|
+
function refusalCollector() {
|
|
44
|
+
let lastCollectionAt = Number.NEGATIVE_INFINITY;
|
|
45
|
+
let intervalMs = REFUSAL_COLLECTION_MIN_INTERVAL_MS;
|
|
46
|
+
return () => {
|
|
47
|
+
const startedAt = performance.now();
|
|
48
|
+
if (startedAt - lastCollectionAt < intervalMs) return false;
|
|
49
|
+
lastCollectionAt = startedAt;
|
|
50
|
+
if (!collectAndReturnPages()) return false;
|
|
51
|
+
intervalMs = Math.max(
|
|
52
|
+
REFUSAL_COLLECTION_MIN_INTERVAL_MS,
|
|
53
|
+
(performance.now() - startedAt) * REFUSAL_COLLECTION_TIME_MULTIPLE
|
|
54
|
+
);
|
|
55
|
+
return true;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
var collectGarbageBeforeRefusal = refusalCollector();
|
|
59
|
+
var collectGarbageBeforeAnswerRefusal = refusalCollector();
|
|
60
|
+
function collectYoungGenerationBeforeRefusal() {
|
|
61
|
+
const startedAt = performance.now();
|
|
62
|
+
if (startedAt - lastYoungCollectionAt < REFUSAL_YOUNG_COLLECTION_MIN_INTERVAL_MS) return false;
|
|
63
|
+
lastYoungCollectionAt = startedAt;
|
|
64
|
+
return collectYoungGeneration();
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export { admitHeapBytes, admittedHeapBytes, chargeHeapBytes, collectGarbageBeforeAnswerRefusal, collectGarbageBeforeRefusal, collectYoungGenerationBeforeRefusal, onRefusalAfterCollection, reportRefusalAfterCollection, reserveHeapBytes, reservedHeapBytes };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { decodeVectorGraphPartPayload, assembleGraphParts, decodeVectorFilePayload, countDead, VECTOR_FILE_MAX_VECTORS, deadBytesFor } from './chunk-OCB7TMUQ.mjs';
|
|
2
|
-
import { MAX_SEGMENT_ID, MANIFEST_ENVELOPE_VERSION, EARLIER_SEGMENT_MANIFEST_VERSION, SEGMENT_MANIFEST_VERSION, MAX_SEGMENTS_PER_PARTITION, segmentKey, readSegmentFile, manifestKey, segmentsPrefix, readListedFile, requireListedChecksum, vectorFileKey, graphPartKey } from './chunk-
|
|
3
|
-
import { VERSION, rulesOfStoredSynonyms, openChecksummedEnvelope, readHeader, HEADER_SIZE, crc32, engineVersionParts, writeHeader, packChecksummedEnvelope } from './chunk-
|
|
4
|
-
import { decodeEveryStoredDocument, createSharedFrozenSegment, shareSegmentArrays } from './chunk-
|
|
2
|
+
import { MAX_SEGMENT_ID, MANIFEST_ENVELOPE_VERSION, EARLIER_SEGMENT_MANIFEST_VERSION, SEGMENT_MANIFEST_VERSION, MAX_SEGMENTS_PER_PARTITION, segmentKey, readSegmentFile, manifestKey, segmentsPrefix, readListedFile, requireListedChecksum, vectorFileKey, graphPartKey } from './chunk-27ZEY73B.mjs';
|
|
3
|
+
import { VERSION, rulesOfStoredSynonyms, openChecksummedEnvelope, readHeader, HEADER_SIZE, crc32, engineVersionParts, writeHeader, packChecksummedEnvelope } from './chunk-PABYSTKO.mjs';
|
|
4
|
+
import { decodeEveryStoredDocument, createSharedFrozenSegment, shareSegmentArrays } from './chunk-5QIRLJH4.mjs';
|
|
5
5
|
import { flattenSchema, requireValidFieldTypes, isQuantizationMode, isStorageMode } from './chunk-DG62H7OD.mjs';
|
|
6
6
|
import { MAX_FILE_BYTES, VALID_HNSW_METRICS } from './chunk-U476IXKQ.mjs';
|
|
7
7
|
import { compareCodePoints } from './chunk-YTJCGKM4.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { removeDocumentVectors, prepareDocumentVectors, insertDocumentVectors } from './chunk-
|
|
1
|
+
import { removeDocumentVectors, prepareDocumentVectors, insertDocumentVectors } from './chunk-PABYSTKO.mjs';
|
|
2
2
|
import { getNestedValue } from './chunk-KCQG2PJT.mjs';
|
|
3
3
|
import { requireValidFieldTypes } from './chunk-DG62H7OD.mjs';
|
|
4
4
|
import { VECTOR_PATTERN } from './chunk-L5ORED7V.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { nodeThreadId } from './chunk-
|
|
1
|
+
import { nodeThreadId } from './chunk-W55X2BYN.mjs';
|
|
2
2
|
import { getFs, getPath } from './chunk-HLPRHOSO.mjs';
|
|
3
|
-
import { DIRECTORY_LOCK_ATTEMPTS, DIRECTORY_LOCK_SETTLE_MS, DIRECTORY_LOCK_PROCESS_START_TOLERANCE_MS } from './chunk-
|
|
3
|
+
import { DIRECTORY_LOCK_ATTEMPTS, DIRECTORY_LOCK_SETTLE_MS, DIRECTORY_LOCK_PROCESS_START_TOLERANCE_MS } from './chunk-27ZEY73B.mjs';
|
|
4
4
|
import { compareCodePoints } from './chunk-YTJCGKM4.mjs';
|
|
5
5
|
import { NarsilError, ErrorCodes } from './chunk-OBWUWZRA.mjs';
|
|
6
6
|
import { openSync, close, readFileSync } from 'fs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { sanitizeSurfaceForms, patternIndexesFromWire, dropStoredVectorValues } from './chunk-
|
|
1
|
+
import { sanitizeSurfaceForms, patternIndexesFromWire, dropStoredVectorValues } from './chunk-JUAFWJON.mjs';
|
|
2
2
|
import { requireValidFieldTypes } from './chunk-DG62H7OD.mjs';
|
|
3
3
|
import { VALID_HNSW_METRICS } from './chunk-U476IXKQ.mjs';
|
|
4
4
|
import { decode } from '@msgpack/msgpack';
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { validateWorkerConfig, validateIndexName, validatePatternValueLimit, requireSurfaceFormsForPartialFields, validateBM25Params, validatePartitionConfig, queryBindingOf, executeQuery, executePreflight, executeSuggest, executeListDocuments, validateDocId } from './chunk-
|
|
1
|
+
import { validateWorkerConfig, validateIndexName, validatePatternValueLimit, requireSurfaceFormsForPartialFields, validateBM25Params, validatePartitionConfig, queryBindingOf, executeQuery, executePreflight, executeSuggest, executeListDocuments, validateDocId } from './chunk-GLZI636G.mjs';
|
|
2
2
|
import { resolveVectorText, bindEngineCore, restoredConfigFields, restoredEmbedding, collectRequiredFieldFailures, embedChunkDocuments, providedDocId, requireDocumentObject, admitInsert, asBatchInsertError, requireMatchingDocId, embedDocumentFields, assertDocumentCarriesMappedVectors, admitBufferedUpsert, createPendingAdmissions, recordPendingAdmission } from './chunk-N57XXGPG.mjs';
|
|
3
3
|
import { splitWorkerBudget, resolveWorkerCount, resolveWorkerEntry, missingWorkerEntry, DEFAULT_REQUEST_TIMEOUT_MS, resolveRequestThreadCount, workerResourceLimits, DEFAULT_BACKPRESSURE_LIMIT, SHUTDOWN_TIMEOUT_MS, CONSECUTIVE_TIMEOUTS_BEFORE_DEATH } from './chunk-6PN3U6XW.mjs';
|
|
4
4
|
import { detectRuntime } from './chunk-AV4IJKD2.mjs';
|
|
5
|
-
import { isEmptySynonymSet, synonymModule, createDirectExecutor, createPartitionRouter, availableSynonymModule, mergeFrozenSegments, createSharedFrozenSegment, freezeSegmentShared, resolvePartitionInsertOptions, createFrozenSegment } from './chunk-
|
|
6
|
-
import { requirePatternSearchFor, requirePartialWordSearchFor, collectQueryTermStats, mergePartitionStats, createPartitionIndex, oversampledFacetConfig, availablePatternSearch, PATTERN_HOST, kWayMerge, mergeFacets, isCompositePartition, fnv1a, encodeSegmentState } from './chunk-
|
|
5
|
+
import { isEmptySynonymSet, synonymModule, createDirectExecutor, createPartitionRouter, availableSynonymModule, mergeFrozenSegments, createSharedFrozenSegment, freezeSegmentShared, resolvePartitionInsertOptions, createFrozenSegment } from './chunk-5QIRLJH4.mjs';
|
|
6
|
+
import { requirePatternSearchFor, requirePartialWordSearchFor, collectQueryTermStats, mergePartitionStats, createPartitionIndex, oversampledFacetConfig, availablePatternSearch, PATTERN_HOST, kWayMerge, mergeFacets, isCompositePartition, fnv1a, encodeSegmentState } from './chunk-5WEBVYOA.mjs';
|
|
7
7
|
import { generateId, getLanguage } from './chunk-FUUP45IS.mjs';
|
|
8
|
-
import { readHeapStatistics } from './chunk-
|
|
8
|
+
import { readHeapStatistics } from './chunk-ZATRDAYU.mjs';
|
|
9
|
+
import { countEngineThread } from './chunk-EBIHRL7B.mjs';
|
|
9
10
|
import { DEFAULT_MAX_RERANK_WINDOW, DEFAULT_RERANK_TIMEOUT_MS } from './chunk-HJSN7UYG.mjs';
|
|
10
11
|
import { MAX_INDEX_CONFIGURATION_BYTES, MAX_SWEEP_INTERVAL_MS, MIN_SWEEP_INTERVAL_MS, STATISTICS_BROADCAST_INTERVAL_MS, MAX_EXPORT_LINE_BYTES, IMPORT_BATCH_DOCUMENTS, HEAP_PRESSURE_WARNING_FRACTION, FOREIGN_STATS_TTL_MS, MAX_IMPORT_REFUSALS_REPORTED, MIN_DOCUMENTS_FOR_SEGMENTS, HEAP_PRESSURE_REARM_FRACTION, BATCH_CHUNK_SIZE } from './chunk-LXWDQLTW.mjs';
|
|
11
12
|
import { requireSearchBackendSettings } from './chunk-VK45J47R.mjs';
|
|
@@ -16,7 +17,7 @@ import { NATIVE_CRC32_MIN_BYTES, MAX_FILE_BYTES, CHECKSUM_YIELD_CHUNK_BYTES } fr
|
|
|
16
17
|
import { isSingleStringFieldType } from './chunk-6ODIY6ZB.mjs';
|
|
17
18
|
import { compareCodePoints } from './chunk-YTJCGKM4.mjs';
|
|
18
19
|
import { createRequestId, isValidWorkerResponse } from './chunk-CQUMNIIG.mjs';
|
|
19
|
-
import { loadVectorCodeFor, requireLoadedVectorCode } from './chunk-
|
|
20
|
+
import { loadVectorCodeFor, requireLoadedVectorCode } from './chunk-4PFOOQFQ.mjs';
|
|
20
21
|
import { noteThreadSlotLive, threadSlotOfWorker, noteThreadSlotGone } from './chunk-RFBLQLLZ.mjs';
|
|
21
22
|
import { MAX_DOCUMENT_NESTING_DEPTH } from './chunk-L5ORED7V.mjs';
|
|
22
23
|
import { ErrorCodes, NarsilError } from './chunk-OBWUWZRA.mjs';
|
|
@@ -2761,6 +2762,7 @@ async function createWorkerFactory(entryPoint) {
|
|
|
2761
2762
|
resourceLimits: workerResourceLimits(),
|
|
2762
2763
|
workerData: { workerId }
|
|
2763
2764
|
});
|
|
2765
|
+
countEngineThread(instance, workerResourceLimits().maxYoungGenerationSizeMb);
|
|
2764
2766
|
return createWorkerExecutor(instance, { onDeath, onGone });
|
|
2765
2767
|
};
|
|
2766
2768
|
}
|
|
@@ -4037,7 +4039,7 @@ async function createEngineCore(config, hooks, capacityScope = "index") {
|
|
|
4037
4039
|
if (config?.lifecycle !== void 0 && durabilityTier === null) {
|
|
4038
4040
|
throw new NarsilError(ErrorCodes.CONFIG_INVALID, "Index lifecycle settings require durability");
|
|
4039
4041
|
}
|
|
4040
|
-
const durabilityWiring = durabilityTier === null ? null : await import('./durability-wiring-
|
|
4042
|
+
const durabilityWiring = durabilityTier === null ? null : await import('./durability-wiring-XZI6355I.mjs');
|
|
4041
4043
|
const filesystemDurability = durabilityTier?.kind === "wal";
|
|
4042
4044
|
const executor = createDirectExecutor({
|
|
4043
4045
|
vectorWorkerCopies: vectorCopyPolicy,
|
|
@@ -6434,6 +6436,7 @@ function getVectorMaintenanceStatus(manager) {
|
|
|
6434
6436
|
graphCount: status.graphCount,
|
|
6435
6437
|
bufferSize: status.bufferSize,
|
|
6436
6438
|
building: status.building,
|
|
6439
|
+
waitingForMemory: status.waitingForMemory,
|
|
6437
6440
|
estimatedCompactMs: status.estimatedCompactMs,
|
|
6438
6441
|
estimatedOptimizeMs: status.estimatedOptimizeMs
|
|
6439
6442
|
});
|
|
@@ -6951,14 +6954,14 @@ function portabilityOperations(core, config, engine) {
|
|
|
6951
6954
|
return {
|
|
6952
6955
|
snapshot(indexName) {
|
|
6953
6956
|
return withOpenIndex(indexName, async () => {
|
|
6954
|
-
const { createSnapshot } = await import('./snapshot-
|
|
6957
|
+
const { createSnapshot } = await import('./snapshot-PDUGHQ25.mjs');
|
|
6955
6958
|
return createSnapshot(snapshotDepsOf(indexName));
|
|
6956
6959
|
});
|
|
6957
6960
|
},
|
|
6958
6961
|
async restore(indexName, data) {
|
|
6959
6962
|
core.guardShutdown();
|
|
6960
6963
|
validateIndexName(indexName);
|
|
6961
|
-
const restored = import('./restore-queue-
|
|
6964
|
+
const restored = import('./restore-queue-JAZAB5IQ.mjs').then(
|
|
6962
6965
|
({ queueRestore }) => queueRestore(core, restoreHost, restoresInFlight, indexName, data)
|
|
6963
6966
|
);
|
|
6964
6967
|
await emitWriteEventAfter(core, indexName, restored);
|
|
@@ -6967,8 +6970,8 @@ function portabilityOperations(core, config, engine) {
|
|
|
6967
6970
|
exportDocuments(indexName) {
|
|
6968
6971
|
return withOpenIndex(indexName, async () => {
|
|
6969
6972
|
const [{ checkpointForArchive }, { documentExportStream }] = await Promise.all([
|
|
6970
|
-
import('./snapshot-
|
|
6971
|
-
import('./write-
|
|
6973
|
+
import('./snapshot-PDUGHQ25.mjs'),
|
|
6974
|
+
import('./write-KVJ7YJJ6.mjs')
|
|
6972
6975
|
]);
|
|
6973
6976
|
const header = indexConfigurationOf(core.requireIndex(indexName));
|
|
6974
6977
|
return documentExportStream(header, await checkpointForArchive(snapshotDepsOf(indexName)));
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// src/runtime/background-memory.ts
|
|
2
|
+
var admissions = /* @__PURE__ */ new Set();
|
|
3
|
+
var waiting = /* @__PURE__ */ new Map();
|
|
4
|
+
function addBackgroundAdmission(admission) {
|
|
5
|
+
admissions.add(admission);
|
|
6
|
+
return () => {
|
|
7
|
+
admissions.delete(admission);
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
function admitsBackgroundBytes(bytes) {
|
|
11
|
+
for (const admission of admissions) {
|
|
12
|
+
if (!admission(bytes)) return false;
|
|
13
|
+
}
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
function noteWaitingForMemory(owner, work) {
|
|
17
|
+
if (work === null) waiting.delete(owner);
|
|
18
|
+
else waiting.set(owner, work);
|
|
19
|
+
}
|
|
20
|
+
function workWaitingForMemory() {
|
|
21
|
+
return [...waiting.values()];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { addBackgroundAdmission, admitsBackgroundBytes, noteWaitingForMemory, workWaitingForMemory };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { vectorsPerFile } from './chunk-
|
|
2
|
-
import { writeLiveVectors, decodeSegmentManifest, openManifestPayload, listedKeysOf, decodeManifestPayload, SINGLE_NODE_PRIMARY_TERM } from './chunk-
|
|
1
|
+
import { vectorsPerFile } from './chunk-CU4OB64V.mjs';
|
|
2
|
+
import { writeLiveVectors, decodeSegmentManifest, openManifestPayload, listedKeysOf, decodeManifestPayload, SINGLE_NODE_PRIMARY_TERM } from './chunk-JUAFWJON.mjs';
|
|
3
3
|
import { vectorsToBytes, VECTOR_FILE_PAYLOAD_VERSION } from './chunk-OCB7TMUQ.mjs';
|
|
4
|
-
import { writeCheckpointSegments, DEFAULT_COMPACTION_THRESHOLD, commitCheckpointManifest, manifestKey, manifestFileRefs, partitionContentsOf } from './chunk-
|
|
5
|
-
import { HEADER_SIZE } from './chunk-
|
|
4
|
+
import { writeCheckpointSegments, DEFAULT_COMPACTION_THRESHOLD, commitCheckpointManifest, manifestKey, manifestFileRefs, partitionContentsOf } from './chunk-27ZEY73B.mjs';
|
|
5
|
+
import { HEADER_SIZE } from './chunk-PABYSTKO.mjs';
|
|
6
6
|
import { MAX_FILE_BYTES } from './chunk-U476IXKQ.mjs';
|
|
7
7
|
import { NarsilError, ErrorCodes } from './chunk-OBWUWZRA.mjs';
|
|
8
8
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IDLE_HEAP_CLEANUP_CHECK_MS, IDLE_HEAP_CLEANUP_MAX_UTILISATION, IDLE_HEAP_CLEANUP_MAX_GROWTH_BYTES, IDLE_HEAP_CLEANUP_QUIET_CHECKS, IDLE_HEAP_CLEANUP_MIN_RECLAIMABLE_BYTES } from './chunk-
|
|
1
|
+
import { IDLE_HEAP_CLEANUP_CHECK_MS, IDLE_HEAP_CLEANUP_MAX_UTILISATION, IDLE_HEAP_CLEANUP_MAX_GROWTH_BYTES, IDLE_HEAP_CLEANUP_QUIET_CHECKS, IDLE_HEAP_CLEANUP_MIN_RECLAIMABLE_BYTES } from './chunk-22YPZVMG.mjs';
|
|
2
2
|
import { performance } from 'perf_hooks';
|
|
3
3
|
import { setFlagsFromString, getHeapStatistics } from 'v8';
|
|
4
4
|
import { runInNewContext } from 'vm';
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import { countEngineThread } from './chunk-EBIHRL7B.mjs';
|
|
2
|
+
|
|
1
3
|
// src/workers/node-worker.ts
|
|
2
4
|
async function spawnNodeWorker(entryPoint, resourceLimits) {
|
|
3
5
|
try {
|
|
4
6
|
const workerThreads = await import('worker_threads');
|
|
5
|
-
|
|
7
|
+
const worker = new workerThreads.Worker(entryPoint, { resourceLimits });
|
|
8
|
+
countEngineThread(worker, resourceLimits?.maxYoungGenerationSizeMb);
|
|
9
|
+
return worker;
|
|
6
10
|
} catch {
|
|
7
11
|
return null;
|
|
8
12
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { youngGenerationBytesOfThisV8 } from './chunk-EBIHRL7B.mjs';
|
|
2
|
+
import { PROCESS_LIMIT_REFRESH_INTERVAL_MS } from './chunk-22YPZVMG.mjs';
|
|
2
3
|
import { totalmem, freemem } from 'os';
|
|
3
4
|
import { getHeapSpaceStatistics, getHeapStatistics } from 'v8';
|
|
4
5
|
|
|
@@ -16,6 +17,15 @@ function memoryTheHostAllows() {
|
|
|
16
17
|
const constrained = process.constrainedMemory?.() ?? 0;
|
|
17
18
|
return constrained > 0 ? constrained : totalmem();
|
|
18
19
|
}
|
|
20
|
+
function readConfiguredOldSpaceMegabytes() {
|
|
21
|
+
let megabytes = null;
|
|
22
|
+
for (const entry of flagEntries()) {
|
|
23
|
+
const inMegabytes = IN_MEGABYTES.exec(entry);
|
|
24
|
+
if (inMegabytes !== null) megabytes = Number(inMegabytes[1]);
|
|
25
|
+
if (AS_PERCENTAGE.test(entry)) megabytes = null;
|
|
26
|
+
}
|
|
27
|
+
return megabytes !== null && Number.isFinite(megabytes) && megabytes > 0 ? megabytes : null;
|
|
28
|
+
}
|
|
19
29
|
function readConfiguredLimit() {
|
|
20
30
|
let megabytes = null;
|
|
21
31
|
let percentage = null;
|
|
@@ -59,6 +69,21 @@ function heapSizeLimitBytes() {
|
|
|
59
69
|
if (heapSizeLimit === void 0) heapSizeLimit = getHeapStatistics().heap_size_limit;
|
|
60
70
|
return heapSizeLimit;
|
|
61
71
|
}
|
|
72
|
+
function readYoungGenerationCeiling() {
|
|
73
|
+
const fromSemiSpace = configuredYoungGenerationBytes();
|
|
74
|
+
if (fromSemiSpace !== null) return fromSemiSpace;
|
|
75
|
+
const oldSpaceMegabytes = readConfiguredOldSpaceMegabytes();
|
|
76
|
+
if (oldSpaceMegabytes !== null) {
|
|
77
|
+
const beyondOldSpace = heapSizeLimitBytes() - oldSpaceMegabytes * MEGABYTE_BYTES;
|
|
78
|
+
if (beyondOldSpace > 0) return beyondOldSpace;
|
|
79
|
+
}
|
|
80
|
+
return youngGenerationBytesOfThisV8();
|
|
81
|
+
}
|
|
82
|
+
var youngGenerationCeiling;
|
|
83
|
+
function youngGenerationCeilingBytes() {
|
|
84
|
+
if (youngGenerationCeiling === void 0) youngGenerationCeiling = readYoungGenerationCeiling();
|
|
85
|
+
return youngGenerationCeiling;
|
|
86
|
+
}
|
|
62
87
|
function readOldGenerationStatistics() {
|
|
63
88
|
try {
|
|
64
89
|
let usedBytes = 0;
|
|
@@ -74,13 +99,16 @@ function readOldGenerationStatistics() {
|
|
|
74
99
|
committedBytes += space.space_size;
|
|
75
100
|
}
|
|
76
101
|
}
|
|
77
|
-
const
|
|
102
|
+
const youngCeilingBytes = youngGenerationCeilingBytes();
|
|
103
|
+
const limitBytes2 = configuredLimitBytes() ?? heapSizeLimitBytes() - youngCeilingBytes;
|
|
78
104
|
if (!Number.isFinite(usedBytes) || !Number.isFinite(limitBytes2) || limitBytes2 <= 0) return null;
|
|
79
105
|
return {
|
|
80
106
|
usedBytes,
|
|
81
107
|
limitBytes: limitBytes2,
|
|
82
108
|
youngUsedBytes: Number.isFinite(youngUsedBytes) ? youngUsedBytes : 0,
|
|
83
|
-
committedBytes: Number.isFinite(committedBytes) ? committedBytes : usedBytes
|
|
109
|
+
committedBytes: Number.isFinite(committedBytes) ? committedBytes : usedBytes,
|
|
110
|
+
youngReserveBytes: Number.isFinite(youngCapacityBytes) ? Math.max(0, youngCeilingBytes - youngCapacityBytes) : 0,
|
|
111
|
+
youngCeilingBytes
|
|
84
112
|
};
|
|
85
113
|
} catch {
|
|
86
114
|
return null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { P as PartitionConfig, A as AnyDocument, a as InsertOptions, W as WriteOptions } from './schema-4W_7tk1f.js';
|
|
2
|
-
import { V as VectorMaintenanceResult, B as BatchResult, L as ListParams, g as ListResult, I as IndexInfo, k as IndexStats, l as PartitionStatsResult, Q as QueryParams, e as QueryResult, P as PreflightResult, h as SuggestParams, j as SuggestResult } from './events-
|
|
2
|
+
import { V as VectorMaintenanceResult, B as BatchResult, L as ListParams, g as ListResult, I as IndexInfo, k as IndexStats, l as PartitionStatsResult, Q as QueryParams, e as QueryResult, P as PreflightResult, h as SuggestParams, j as SuggestResult } from './events-D8GPB1-H.js';
|
|
3
3
|
import { a as SynonymRule } from './synonyms-CpOAHPa-.js';
|
|
4
|
-
import { e as TaskRecord, M as MemoryStatsResponse, b as ImportResult, H as HttpIndexConfig, c as TaskListQuery, T as TaskListPage } from './tasks-
|
|
4
|
+
import { e as TaskRecord, M as MemoryStatsResponse, b as ImportResult, H as HttpIndexConfig, c as TaskListQuery, T as TaskListPage } from './tasks-5_LCFEzF.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* This is the `fetch` implementation the client sends every request through.
|
package/dist/client.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { C as ClientErrorCode, a as ClientErrorCodes, E as ErrorCode, b as ErrorCodes, N as NarsilError, c as NarsilErrorCode, S as ServerErrorCode, d as ServerErrorCodes, i as isNarsilError } from './events-
|
|
2
|
-
export { A as ASYNC_IMPORT_CAPABILITY, D as DOCUMENT_EXPORT_CAPABILITY, E as ErrorEnvelope, I as INDEX_LIFECYCLE_CAPABILITY, R as REBUILD_ANALYSIS_CAPABILITY, S as SERVER_CAPABILITIES, a as SYNONYMS_CAPABILITY, T as TASK_CANCEL_CAPABILITY, b as TASK_FILTER_CAPABILITY } from './capabilities-
|
|
3
|
-
export { C as CapabilitiesResponse, a as CreateIndexEmbedding, H as HttpIndexConfig, I as ImportError, b as ImportResult, M as MemoryStatsResponse, T as TaskListPage, c as TaskListQuery, d as TaskProgress, e as TaskRecord, f as TaskStatus, g as TaskType } from './tasks-
|
|
4
|
-
export { A as AdminOperations, B as BulkOperations, D as DocumentOperations, F as FetchFunction, I as ImportSource, a as IndexOperations, N as NarsilClient, b as NarsilClientOptions, P as PutResult, R as RequestOptions, S as SearchOperations, c as ServerOperations, d as ServerVersion, T as TaskOperations, W as WaitForTaskOptions, e as createNarsilClient } from './client-
|
|
1
|
+
export { C as ClientErrorCode, a as ClientErrorCodes, E as ErrorCode, b as ErrorCodes, N as NarsilError, c as NarsilErrorCode, S as ServerErrorCode, d as ServerErrorCodes, i as isNarsilError } from './events-D8GPB1-H.js';
|
|
2
|
+
export { A as ASYNC_IMPORT_CAPABILITY, D as DOCUMENT_EXPORT_CAPABILITY, E as ErrorEnvelope, I as INDEX_LIFECYCLE_CAPABILITY, R as REBUILD_ANALYSIS_CAPABILITY, S as SERVER_CAPABILITIES, a as SYNONYMS_CAPABILITY, T as TASK_CANCEL_CAPABILITY, b as TASK_FILTER_CAPABILITY } from './capabilities-DOgB3pPf.js';
|
|
3
|
+
export { C as CapabilitiesResponse, a as CreateIndexEmbedding, H as HttpIndexConfig, I as ImportError, b as ImportResult, M as MemoryStatsResponse, T as TaskListPage, c as TaskListQuery, d as TaskProgress, e as TaskRecord, f as TaskStatus, g as TaskType } from './tasks-5_LCFEzF.js';
|
|
4
|
+
export { A as AdminOperations, B as BulkOperations, D as DocumentOperations, F as FetchFunction, I as ImportSource, a as IndexOperations, N as NarsilClient, b as NarsilClientOptions, P as PutResult, R as RequestOptions, S as SearchOperations, c as ServerOperations, d as ServerVersion, T as TaskOperations, W as WaitForTaskOptions, e as createNarsilClient } from './client-BGzLNt78.js';
|
|
5
5
|
import './schema-4W_7tk1f.js';
|
|
6
6
|
import './adapters-BQFQ4PRz.js';
|
|
7
7
|
import './synonyms-CpOAHPa-.js';
|
|
8
|
-
import './config-
|
|
9
|
-
import './config-
|
|
8
|
+
import './config-CS5ADSrx.js';
|
|
9
|
+
import './config-CSYMTTm1.js';
|
|
10
10
|
import './index-Cl5qQauj.js';
|
|
11
11
|
import './types-DvncmvuQ.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as NarsilConfig } from './config-
|
|
1
|
+
import { N as NarsilConfig } from './config-CSYMTTm1.js';
|
|
2
2
|
import { A as AllocationTable, N as NodeRole, a as NodeRegistration, C as ClusterCoordinator, b as NodeCapacity } from './index-Cl5qQauj.js';
|
|
3
3
|
import { N as NodeTransport } from './types-DvncmvuQ.js';
|
|
4
4
|
|
|
@@ -123,6 +123,17 @@ interface CoordinatorRequestFigure {
|
|
|
123
123
|
/** The total time that the calls took, in seconds. */
|
|
124
124
|
sumSeconds: number;
|
|
125
125
|
}
|
|
126
|
+
/**
|
|
127
|
+
* A vector field whose rebuild waits for memory on this node.
|
|
128
|
+
*
|
|
129
|
+
* @public
|
|
130
|
+
*/
|
|
131
|
+
interface VectorRebuildWaitFigure {
|
|
132
|
+
/** The index that holds the vector field. */
|
|
133
|
+
indexName: string;
|
|
134
|
+
/** The vector field whose graph waits to be rebuilt. */
|
|
135
|
+
fieldName: string;
|
|
136
|
+
}
|
|
126
137
|
/**
|
|
127
138
|
* The replication and coordinator figures that one node reports.
|
|
128
139
|
*
|
|
@@ -137,6 +148,11 @@ interface ClusterMetrics {
|
|
|
137
148
|
partitions: PartitionReplicationFigure[];
|
|
138
149
|
/** The timing of this node's coordinator calls, one entry per kind of call that the node has made. */
|
|
139
150
|
coordinatorRequests: CoordinatorRequestFigure[];
|
|
151
|
+
/**
|
|
152
|
+
* Each vector field on this node whose rebuild, the one that keeps recall up, waits because the node lacks the
|
|
153
|
+
* memory to hold a second graph beside the one it serves. The rebuild starts once the node has room.
|
|
154
|
+
*/
|
|
155
|
+
vectorRebuildsWaitingForMemory: VectorRebuildWaitFigure[];
|
|
140
156
|
}
|
|
141
157
|
|
|
142
158
|
/**
|
|
@@ -421,4 +437,4 @@ interface ClusterNodeInfo {
|
|
|
421
437
|
status: string;
|
|
422
438
|
}
|
|
423
439
|
|
|
424
|
-
export type { ClusterNamespace as C, IndexHealth as I, NodeReadiness as N, PartitionReplicationFigure as P, ReplicaLagFigure as R, CreateIndexOptions as a, ClusterNodeConfig as b, ClusterControllerConfig as c, ClusterHealth as d, ClusterHealthStatus as e, ClusterMemoryConfig as f, ClusterMetrics as g, ClusterNodeInfo as h, ClusterQueryConfig as i, CommitPointFigure as j, CoordinatorRequestFigure as k, ReplicationConfig as l };
|
|
440
|
+
export type { ClusterNamespace as C, IndexHealth as I, NodeReadiness as N, PartitionReplicationFigure as P, ReplicaLagFigure as R, VectorRebuildWaitFigure as V, CreateIndexOptions as a, ClusterNodeConfig as b, ClusterControllerConfig as c, ClusterHealth as d, ClusterHealthStatus as e, ClusterMemoryConfig as f, ClusterMetrics as g, ClusterNodeInfo as h, ClusterQueryConfig as i, CommitPointFigure as j, CoordinatorRequestFigure as k, ReplicationConfig as l };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { P as PersistenceAdapter, I as InvalidationAdapter, E as EmbeddingAdapter, R as RerankAdapter } from './adapters-BQFQ4PRz.js';
|
|
2
|
-
import { Q as QueryParams, e as QueryResult, f as NarsilEventHandlers } from './events-
|
|
2
|
+
import { Q as QueryParams, e as QueryResult, f as NarsilEventHandlers } from './events-D8GPB1-H.js';
|
|
3
3
|
import { I as IndexConfig, A as AnyDocument } from './schema-4W_7tk1f.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export { createDirectExecutor } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { createDirectExecutor } from './chunk-5QIRLJH4.mjs';
|
|
2
|
+
import './chunk-5WEBVYOA.mjs';
|
|
3
3
|
import './chunk-FUUP45IS.mjs';
|
|
4
|
-
import './chunk-
|
|
4
|
+
import './chunk-ZATRDAYU.mjs';
|
|
5
|
+
import './chunk-EBIHRL7B.mjs';
|
|
5
6
|
import './chunk-TGP5M5R7.mjs';
|
|
6
7
|
import './chunk-U2BKYEC7.mjs';
|
|
7
8
|
import './chunk-HNAP2KTG.mjs';
|
|
@@ -19,7 +20,7 @@ import './chunk-7X5JST5L.mjs';
|
|
|
19
20
|
import './chunk-OFYKBKKV.mjs';
|
|
20
21
|
import './chunk-R6A773WK.mjs';
|
|
21
22
|
import './chunk-YTJCGKM4.mjs';
|
|
22
|
-
import './chunk-
|
|
23
|
-
import './chunk-
|
|
23
|
+
import './chunk-4PFOOQFQ.mjs';
|
|
24
|
+
import './chunk-22YPZVMG.mjs';
|
|
24
25
|
import './chunk-L5ORED7V.mjs';
|
|
25
26
|
import './chunk-OBWUWZRA.mjs';
|
package/dist/distribution.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { a as CreateIndexOptions, C as ClusterNamespace, b as ClusterNodeConfig } from './config-
|
|
2
|
-
export { c as ClusterControllerConfig, d as ClusterHealth, e as ClusterHealthStatus, f as ClusterMemoryConfig, g as ClusterMetrics, h as ClusterNodeInfo, i as ClusterQueryConfig, j as CommitPointFigure, k as CoordinatorRequestFigure, I as IndexHealth, N as NodeReadiness, P as PartitionReplicationFigure, R as ReplicaLagFigure, l as ReplicationConfig } from './config-
|
|
1
|
+
import { a as CreateIndexOptions, C as ClusterNamespace, b as ClusterNodeConfig } from './config-CS5ADSrx.js';
|
|
2
|
+
export { c as ClusterControllerConfig, d as ClusterHealth, e as ClusterHealthStatus, f as ClusterMemoryConfig, g as ClusterMetrics, h as ClusterNodeInfo, i as ClusterQueryConfig, j as CommitPointFigure, k as CoordinatorRequestFigure, I as IndexHealth, N as NodeReadiness, P as PartitionReplicationFigure, R as ReplicaLagFigure, l as ReplicationConfig, V as VectorRebuildWaitFigure } from './config-CS5ADSrx.js';
|
|
3
3
|
import { R as RerankAdapter } from './adapters-BQFQ4PRz.js';
|
|
4
|
-
import { B as BatchResult, L as ListParams, g as ListResult, h as SuggestParams, j as SuggestResult, Q as QueryParams, P as PreflightResult, I as IndexInfo, k as IndexStats, l as PartitionStatsResult, M as MemoryStats, m as NarsilEventMap, e as QueryResult } from './events-
|
|
4
|
+
import { B as BatchResult, L as ListParams, g as ListResult, h as SuggestParams, j as SuggestResult, Q as QueryParams, P as PreflightResult, I as IndexInfo, k as IndexStats, l as PartitionStatsResult, M as MemoryStats, m as NarsilEventMap, e as QueryResult } from './events-D8GPB1-H.js';
|
|
5
5
|
import { I as IndexConfig, A as AnyDocument, a as InsertOptions } from './schema-4W_7tk1f.js';
|
|
6
6
|
import { a as SynonymRule } from './synonyms-CpOAHPa-.js';
|
|
7
7
|
import { b as NodeCapacity, N as NodeRole } from './index-Cl5qQauj.js';
|
|
8
8
|
export { c as AllocationConstraints, d as AllocationEvent, A as AllocationTable, C as ClusterCoordinator, I as IndexPartitionBytes, e as NodeEvent, f as NodeMemoryReport, a as NodeRegistration, P as PartitionAssignment, g as PartitionState, R as RegistrationLease, S as SchemaEvent, U as UnassignedReason } from './index-Cl5qQauj.js';
|
|
9
|
-
import { N as Narsil } from './engine-
|
|
9
|
+
import { N as Narsil } from './engine-CCBBGmMR.js';
|
|
10
10
|
export { L as ListenHandler, N as NodeTransport, R as RespondFn, T as TransportConfig, a as TransportMessage } from './types-DvncmvuQ.js';
|
|
11
|
-
import './config-
|
|
11
|
+
import './config-CSYMTTm1.js';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* The cluster splits an index into this many partitions when
|