@harperfast/harper-pro 5.0.16 → 5.0.18

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.
Files changed (49) hide show
  1. package/core/DESIGN.md +32 -0
  2. package/core/bin/copyDb.ts +19 -0
  3. package/core/resources/RecordEncoder.ts +15 -12
  4. package/core/resources/RocksTransactionLogStore.ts +51 -0
  5. package/core/resources/Table.ts +17 -15
  6. package/core/resources/auditStore.ts +97 -5
  7. package/core/resources/databases.ts +67 -7
  8. package/core/resources/replayLogs.ts +36 -3
  9. package/core/resources/replayLogsGuards.ts +42 -0
  10. package/core/resources/transactionBroadcast.ts +121 -66
  11. package/dist/cloneNode/cloneNode.js +13 -8
  12. package/dist/cloneNode/cloneNode.js.map +1 -1
  13. package/dist/core/bin/copyDb.js +16 -0
  14. package/dist/core/bin/copyDb.js.map +1 -1
  15. package/dist/core/resources/RecordEncoder.js +1 -1
  16. package/dist/core/resources/RecordEncoder.js.map +1 -1
  17. package/dist/core/resources/RocksTransactionLogStore.js.map +1 -1
  18. package/dist/core/resources/Table.js +17 -17
  19. package/dist/core/resources/Table.js.map +1 -1
  20. package/dist/core/resources/auditStore.js +82 -5
  21. package/dist/core/resources/auditStore.js.map +1 -1
  22. package/dist/core/resources/databases.js +68 -5
  23. package/dist/core/resources/databases.js.map +1 -1
  24. package/dist/core/resources/replayLogs.js +26 -2
  25. package/dist/core/resources/replayLogs.js.map +1 -1
  26. package/dist/core/resources/replayLogsGuards.js +43 -0
  27. package/dist/core/resources/replayLogsGuards.js.map +1 -0
  28. package/dist/core/resources/transactionBroadcast.js +129 -71
  29. package/dist/core/resources/transactionBroadcast.js.map +1 -1
  30. package/dist/replication/replicationConnection.js +174 -48
  31. package/dist/replication/replicationConnection.js.map +1 -1
  32. package/dist/replication/replicator.js +11 -2
  33. package/dist/replication/replicator.js.map +1 -1
  34. package/dist/replication/subscriptionManager.js +11 -1
  35. package/dist/replication/subscriptionManager.js.map +1 -1
  36. package/npm-shrinkwrap.json +2 -2
  37. package/package.json +1 -1
  38. package/replication/replicationConnection.ts +176 -55
  39. package/replication/replicator.ts +11 -2
  40. package/replication/subscriptionManager.ts +11 -1
  41. package/studio/web/assets/{index-pr02wSIB.js → index-Tv7e9k8K.js} +5 -5
  42. package/studio/web/assets/{index-pr02wSIB.js.map → index-Tv7e9k8K.js.map} +1 -1
  43. package/studio/web/assets/{index.lazy-CorGZz3L.js → index.lazy-De4JGuec.js} +2 -2
  44. package/studio/web/assets/{index.lazy-CorGZz3L.js.map → index.lazy-De4JGuec.js.map} +1 -1
  45. package/studio/web/assets/{profile-SSvkzt9H.js → profile-voeNsl4C.js} +2 -2
  46. package/studio/web/assets/{profile-SSvkzt9H.js.map → profile-voeNsl4C.js.map} +1 -1
  47. package/studio/web/assets/{status-Xk93QrPQ.js → status-110CCE-v.js} +2 -2
  48. package/studio/web/assets/{status-Xk93QrPQ.js.map → status-110CCE-v.js.map} +1 -1
  49. package/studio/web/index.html +1 -1
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ // Pure helpers for replayLogs (no Harper module dependencies, so unit tests can load
3
+ // them without bootstrapping the full Resource / RocksDB / DatabaseTransaction graph).
4
+ //
5
+ // Background: a node that crashed unclean re-runs replayLogs against the unflushed audit
6
+ // log on next boot. If any audit entry is corrupt or missing its record body, the loop
7
+ // hits a TypeError inside Table.validate() ("Cannot read properties of undefined
8
+ // (reading 'cacheKey')") and the per-iteration catch swallows it — but the loop keeps
9
+ // running over potentially millions of entries, pinning CPU. These guards classify each
10
+ // entry up front so the loop can skip cleanly.
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.RECORD_BEARING_FLAGS = void 0;
13
+ exports.classifyAuditEntryForReplay = classifyAuditEntryForReplay;
14
+ // Mirrors `HAS_RECORD` (16) | `HAS_PARTIAL_RECORD` (32) from auditStore.ts — the action
15
+ // bits the writer sets when an entry carries (or should carry) a record body. Redeclared
16
+ // here so this module stays free of the Harper module graph for unit testing; a lock
17
+ // test pins the value against auditStore so silent drift is caught.
18
+ exports.RECORD_BEARING_FLAGS = 16 | 32;
19
+ /**
20
+ * Decide whether an audit entry pulled from the unflushed log is safe to replay.
21
+ * Returns `null` if the entry should be replayed, or a short reason string if it should
22
+ * be skipped (the loop logs the aggregate skip count once at the end).
23
+ *
24
+ * Operates on the raw integer `action` field rather than the decoded type string: when
25
+ * `readAuditEntry` catches a header decode error it returns `{}`, so both `action` and
26
+ * `tableId` are `undefined` — the same signal — and matching the record-bearing flags
27
+ * directly against the action mirrors how the writer set them in `auditStore.ts`.
28
+ *
29
+ * @param action `auditRecord.extendedType` — the variable-length action field with
30
+ * the event type in the low nibble and HAS_* flags above it
31
+ * @param tableId `auditRecord.tableId`
32
+ * @param hasRecord `true` if `auditRecord.getValue(...)` produced a non-undefined value
33
+ */
34
+ function classifyAuditEntryForReplay(action, tableId, hasRecord) {
35
+ if (action === undefined || tableId === undefined)
36
+ return 'corrupt-header';
37
+ // If the action advertises a record body but the decoded record is undefined, the
38
+ // downstream write path will crash inside validate() on the first attribute deref.
39
+ if ((action & exports.RECORD_BEARING_FLAGS) !== 0 && !hasRecord)
40
+ return 'missing-record';
41
+ return null;
42
+ }
43
+ //# sourceMappingURL=replayLogsGuards.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replayLogsGuards.js","sourceRoot":"","sources":["../../../core/resources/replayLogsGuards.ts"],"names":[],"mappings":";AAAA,qFAAqF;AACrF,uFAAuF;AACvF,EAAE;AACF,yFAAyF;AACzF,uFAAuF;AACvF,iFAAiF;AACjF,sFAAsF;AACtF,wFAAwF;AACxF,+CAA+C;;;AAuB/C,kEAUC;AA/BD,wFAAwF;AACxF,yFAAyF;AACzF,qFAAqF;AACrF,oEAAoE;AACvD,QAAA,oBAAoB,GAAG,EAAE,GAAG,EAAE,CAAC;AAE5C;;;;;;;;;;;;;;GAcG;AACH,SAAgB,2BAA2B,CAC1C,MAA0B,EAC1B,OAA2B,EAC3B,SAAkB;IAElB,IAAI,MAAM,KAAK,SAAS,IAAI,OAAO,KAAK,SAAS;QAAE,OAAO,gBAAgB,CAAC;IAC3E,kFAAkF;IAClF,mFAAmF;IACnF,IAAI,CAAC,MAAM,GAAG,4BAAoB,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS;QAAE,OAAO,gBAAgB,CAAC;IACjF,OAAO,IAAI,CAAC;AACb,CAAC"}
@@ -44,8 +44,24 @@ function addSubscription(table, key, listener, startTime, options) {
44
44
  auditLogIterator = auditStore.getRange({});
45
45
  }
46
46
  auditStore.hasSubscriptionCommitListener = true;
47
+ // Coalesce 'committed' bursts: instead of iterating the audit log synchronously inside the
48
+ // commit microtask (which pegs the event loop during replication backlog catch-up), defer
49
+ // to setImmediate. Multiple commits within the same turn collapse into one notify pass.
50
+ // notifyScheduled stays true for the full drain — including yield-and-resume — so new
51
+ // 'committed' events that fire mid-drain don't spawn an overlapping notify pass.
47
52
  auditStore.on('committed', () => {
48
- notifyFromTransactionData(databaseSubscriptions, auditLogIterator);
53
+ if (!databaseSubscriptions.activeCount) {
54
+ // No per-key listeners; skip the expensive audit-log iteration entirely. But still
55
+ // rotate the nextTransaction promise so any whenNextTransaction() waiter (used by
56
+ // outbound replication on databases with no local subscribers) wakes up.
57
+ if (auditStore.nextTransaction)
58
+ nextTransaction(auditStore);
59
+ return;
60
+ }
61
+ if (databaseSubscriptions.notifyScheduled)
62
+ return;
63
+ databaseSubscriptions.notifyScheduled = true;
64
+ setImmediate(() => notifyFromTransactionData(databaseSubscriptions, auditLogIterator, true));
49
65
  });
50
66
  }
51
67
  }
@@ -75,6 +91,7 @@ function addSubscription(table, key, listener, startTime, options) {
75
91
  subscriptions.key = key;
76
92
  }
77
93
  subscription.subscriptions = subscriptions;
94
+ databaseSubscriptions.activeCount = (databaseSubscriptions.activeCount || 0) + 1;
78
95
  return subscription;
79
96
  }
80
97
  /**
@@ -97,20 +114,21 @@ class Subscription extends IterableEventQueue_ts_1.IterableEventQueue {
97
114
  // cleanup
98
115
  if (!this.subscriptions)
99
116
  return;
117
+ const tableSubscriptions = this.subscriptions.tables;
118
+ const envSubscriptions = tableSubscriptions?.envs;
100
119
  this.subscriptions.splice(this.subscriptions.indexOf(this), 1);
101
120
  if (this.subscriptions.length === 0) {
102
- const tableSubscriptions = this.subscriptions.tables;
103
121
  if (tableSubscriptions) {
104
122
  // TODO: Handle cleanup of wildcard
105
123
  const key = this.subscriptions.key;
106
124
  tableSubscriptions.delete(key);
107
125
  if (tableSubscriptions.size === 0) {
108
- const envSubscriptions = tableSubscriptions.envs;
109
- const dbi = tableSubscriptions.dbi;
110
- delete envSubscriptions[dbi];
126
+ delete envSubscriptions[tableSubscriptions.tableId];
111
127
  }
112
128
  }
113
129
  }
130
+ if (envSubscriptions?.activeCount > 0)
131
+ envSubscriptions.activeCount--;
114
132
  this.subscriptions = null;
115
133
  }
116
134
  toJSON() {
@@ -118,13 +136,27 @@ class Subscription extends IterableEventQueue_ts_1.IterableEventQueue {
118
136
  }
119
137
  }
120
138
  const ACTIONS_OF_INTEREST = ['put', 'patch', 'delete', 'message', 'invalidate'];
121
- function notifyFromTransactionData(subscriptions, auditLogIterable) {
139
+ // Maximum audit records processed per synchronous turn before yielding back to the event loop.
140
+ // Sized to keep per-batch wall time within a few ms on commodity hardware while keeping the
141
+ // scheduling overhead amortized; tune if profiling shows different shapes.
142
+ const NOTIFY_BATCH_SIZE = 256;
143
+ function notifyFromTransactionData(subscriptions, auditLogIterable, allowYield = false) {
122
144
  if (!subscriptions)
123
145
  return; // if no subscriptions to this env path, don't need to read anything
146
+ // If no real subscribers are attached, skip the iteration. The reusable iterator preserves its
147
+ // position and will pick up from where we left it once a subscriber is added.
148
+ if (!subscriptions.activeCount) {
149
+ subscriptions.pendingTxnSubscribers = null; // discard any carry-over from a yielded run
150
+ if (allowYield)
151
+ subscriptions.notifyScheduled = false;
152
+ return;
153
+ }
124
154
  const auditStore = subscriptions.auditStore;
125
155
  auditStore.resetReadTxn?.();
126
- nextTransaction(subscriptions.auditStore);
127
- let subscribersWithTxns;
156
+ nextTransaction(auditStore);
157
+ // subscribersWithTxns is carried across batches so the end_txn signal fires only once the
158
+ // iterator truly drains, not at each yield point.
159
+ let subscribersWithTxns = subscriptions.pendingTxnSubscribers;
128
160
  if (!auditLogIterable) {
129
161
  // rocksdb will pass this in, but with lmdb, we have to re-create the iterable
130
162
  auditLogIterable = auditStore.getRange({
@@ -132,77 +164,103 @@ function notifyFromTransactionData(subscriptions, auditLogIterable) {
132
164
  exclusiveStart: true,
133
165
  });
134
166
  }
135
- for (const auditRecord of auditLogIterable) {
136
- const timestamp = auditRecord.localTime ?? auditRecord.version;
137
- subscriptions.lastTxnTime = timestamp;
138
- if (!ACTIONS_OF_INTEREST.includes(auditRecord.type))
139
- continue;
140
- const tableSubscriptions = subscriptions[auditRecord.tableId];
141
- if (!tableSubscriptions)
142
- continue;
143
- const recordId = auditRecord.recordId;
144
- // TODO: How to handle invalidation
145
- let matchingKey = (0, Resources_ts_1.keyArrayToString)(recordId);
146
- let ancestorLevel = 0;
147
- do {
148
- // we iterate through the key hierarchy, notifying all subscribers for each key,
149
- // so for an id like resource/foo/bar, we notify subscribers for resource/foo/bar, resource/foo/, resource/foo, resource/, and resource
150
- // this allows for efficient subscriptions to children ids/topics
151
- const keySubscriptions = tableSubscriptions.get(matchingKey);
152
- if (keySubscriptions) {
153
- for (const subscription of keySubscriptions) {
154
- if (ancestorLevel > 0 && // only ancestors if the subscription is for ancestors (and apply onlyChildren filtering as necessary)
155
- !(subscription.includeDescendants && !(subscription.onlyChildren && ancestorLevel > 1)))
156
- continue;
157
- if (subscription.startTime >= timestamp) {
158
- continue;
159
- }
160
- try {
161
- let beginTxn;
162
- if (subscription.supportsTransactions && subscription.txnInProgress !== auditRecord.version) {
163
- // if the subscriber supports transactions, we mark this as the beginning of a new transaction
164
- // tracking the subscription so that we can delimit the transaction on next transaction
165
- // (with a beginTxn flag, which may be on an endTxn event)
166
- beginTxn = true;
167
- if (!subscription.txnInProgress) {
168
- // if first txn for subscriber of this cycle, add to the transactional subscribers that we are tracking
169
- if (!subscribersWithTxns)
170
- subscribersWithTxns = [subscription];
171
- else
172
- subscribersWithTxns.push(subscription);
167
+ const iterator = auditLogIterable[Symbol.iterator]?.() ?? auditLogIterable;
168
+ let processed = 0;
169
+ let yielded = false;
170
+ try {
171
+ while (true) {
172
+ const result = iterator.next();
173
+ if (result.done)
174
+ break;
175
+ const auditRecord = result.value;
176
+ const timestamp = auditRecord.localTime ?? auditRecord.version;
177
+ subscriptions.lastTxnTime = timestamp;
178
+ if (ACTIONS_OF_INTEREST.includes(auditRecord.type)) {
179
+ const tableSubscriptions = subscriptions[auditRecord.tableId];
180
+ if (tableSubscriptions) {
181
+ const recordId = auditRecord.recordId;
182
+ // TODO: How to handle invalidation
183
+ let matchingKey = (0, Resources_ts_1.keyArrayToString)(recordId);
184
+ let ancestorLevel = 0;
185
+ do {
186
+ // we iterate through the key hierarchy, notifying all subscribers for each key,
187
+ // so for an id like resource/foo/bar, we notify subscribers for resource/foo/bar, resource/foo/, resource/foo, resource/, and resource
188
+ // this allows for efficient subscriptions to children ids/topics
189
+ const keySubscriptions = tableSubscriptions.get(matchingKey);
190
+ if (keySubscriptions) {
191
+ for (const subscription of keySubscriptions) {
192
+ if (ancestorLevel > 0 && // only ancestors if the subscription is for ancestors (and apply onlyChildren filtering as necessary)
193
+ !(subscription.includeDescendants && !(subscription.onlyChildren && ancestorLevel > 1)))
194
+ continue;
195
+ if (subscription.startTime >= timestamp) {
196
+ continue;
197
+ }
198
+ try {
199
+ let beginTxn;
200
+ if (subscription.supportsTransactions && subscription.txnInProgress !== auditRecord.version) {
201
+ // if the subscriber supports transactions, we mark this as the beginning of a new transaction
202
+ // tracking the subscription so that we can delimit the transaction on next transaction
203
+ // (with a beginTxn flag, which may be on an endTxn event)
204
+ beginTxn = true;
205
+ if (!subscription.txnInProgress) {
206
+ // if first txn for subscriber of this cycle, add to the transactional subscribers that we are tracking
207
+ if (!subscribersWithTxns)
208
+ subscribersWithTxns = [subscription];
209
+ else
210
+ subscribersWithTxns.push(subscription);
211
+ }
212
+ // the version defines the extent of a transaction, all audit records with the same version
213
+ // are part of the same transaction, and when the version changes, we know it is a new
214
+ // transaction
215
+ subscription.txnInProgress = auditRecord.version;
216
+ }
217
+ subscription.listener(recordId, auditRecord, timestamp, beginTxn);
218
+ }
219
+ catch (error) {
220
+ (0, harper_logger_js_1.warn)(error);
221
+ }
173
222
  }
174
- // the version defines the extent of a transaction, all audit records with the same version
175
- // are part of the same transaction, and when the version changes, we know it is a new
176
- // transaction
177
- subscription.txnInProgress = auditRecord.version;
178
223
  }
179
- subscription.listener(recordId, auditRecord, timestamp, beginTxn);
180
- }
181
- catch (error) {
182
- (0, harper_logger_js_1.warn)(error);
183
- }
224
+ if (matchingKey == null)
225
+ break;
226
+ const lastSlash = matchingKey.lastIndexOf?.('/', matchingKey.length - 2);
227
+ if (lastSlash !== matchingKey.length - 1) {
228
+ ancestorLevel++; // don't increase the ancestor level for this going from resource/ to resource
229
+ }
230
+ if (lastSlash > -1) {
231
+ matchingKey = matchingKey.slice(0, lastSlash + 1);
232
+ }
233
+ else
234
+ matchingKey = null;
235
+ } while (true);
184
236
  }
185
237
  }
186
- if (matchingKey == null)
187
- break;
188
- const lastSlash = matchingKey.lastIndexOf?.('/', matchingKey.length - 2);
189
- if (lastSlash !== matchingKey.length - 1) {
190
- ancestorLevel++; // don't increase the ancestor level for this going from resource/ to resource
238
+ if (allowYield && ++processed >= NOTIFY_BATCH_SIZE) {
239
+ // Yield the event loop. Save in-progress txn state so the next batch can resume.
240
+ // Reusable iterables (rocksdb) can be passed back in directly; LMDB-style iterables
241
+ // are recreated from the advanced lastTxnTime. The same-thread aftercommit path does not
242
+ // set allowYield because it holds an inter-thread lock that must not span event-loop turns.
243
+ subscriptions.pendingTxnSubscribers = subscribersWithTxns;
244
+ yielded = true;
245
+ setImmediate(() => notifyFromTransactionData(subscriptions, auditStore.reusableIterable ? auditLogIterable : null, true));
246
+ return;
191
247
  }
192
- if (lastSlash > -1) {
193
- matchingKey = matchingKey.slice(0, lastSlash + 1);
248
+ }
249
+ subscriptions.pendingTxnSubscribers = null;
250
+ if (subscribersWithTxns) {
251
+ // any subscribers with open transactions need to have an event to indicate that their transaction has been ended
252
+ for (const subscription of subscribersWithTxns) {
253
+ subscription.txnInProgress = null; // clean up
254
+ subscription.listener(null, { type: 'end_txn' }, subscriptions.lastTxnTime, true);
194
255
  }
195
- else
196
- matchingKey = null;
197
- } while (true);
198
- }
199
- if (subscribersWithTxns) {
200
- // any subscribers with open transactions need to have an event to indicate that their transaction has been ended
201
- for (const subscription of subscribersWithTxns) {
202
- subscription.txnInProgress = null; // clean up
203
- subscription.listener(null, { type: 'end_txn' }, subscriptions.lastTxnTime, true);
204
256
  }
205
257
  }
258
+ finally {
259
+ // If we yielded, the continuation owns notifyScheduled; otherwise (drain or any throw) we
260
+ // must clear it here so a stuck flag doesn't permanently silence future commits.
261
+ if (allowYield && !yielded)
262
+ subscriptions.notifyScheduled = false;
263
+ }
206
264
  }
207
265
  /**
208
266
  * Interface with database to listen for commits and traverse the audit log only on the same thread.
@@ -1 +1 @@
1
- {"version":3,"file":"transactionBroadcast.js","sourceRoot":"","sources":["../../../core/resources/transactionBroadcast.ts"],"names":[],"mappings":";;AAiBA,0CA0DC;AA8HD,0CAkCC;AAUD,kDAeC;AApQD,0EAA2D;AAC3D,mEAA6D;AAC7D,iDAAkD;AAGlD,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,6CAA6C;AAC3F,MAAM,0BAA0B,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,6CAA6C;AACrG;;;;;;;;;GASG;AACH,SAAgB,eAAe,CAAC,KAAK,EAAE,GAAG,EAAE,QAAuB,EAAE,SAAkB,EAAE,OAAa;IACrG,MAAM,IAAI,GAAG,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC;IACrC,M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