@harperfast/harper 5.0.20 → 5.0.21
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/resources/Table.js +5 -3
- package/dist/resources/Table.js.map +1 -1
- package/package.json +1 -1
- package/resources/Table.ts +5 -2
- package/studio/web/assets/{index-DfcUUI7w.js → index-CWeBJPXe.js} +6 -6
- package/studio/web/assets/index-CWeBJPXe.js.map +1 -0
- package/studio/web/assets/{index.lazy-fbJWTW5l.js → index.lazy-DI14kJT2.js} +2 -2
- package/studio/web/assets/{index.lazy-fbJWTW5l.js.map → index.lazy-DI14kJT2.js.map} +1 -1
- package/studio/web/assets/{profile-IcGoxtBp.js → profile-BeDlmXju.js} +2 -2
- package/studio/web/assets/{profile-IcGoxtBp.js.map → profile-BeDlmXju.js.map} +1 -1
- package/studio/web/assets/{status-CxrkcGr7.js → status-26y1EUMG.js} +2 -2
- package/studio/web/assets/{status-CxrkcGr7.js.map → status-26y1EUMG.js.map} +1 -1
- package/studio/web/index.html +1 -1
- package/studio/web/assets/index-DfcUUI7w.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@harperfast/harper",
|
|
3
3
|
"description": "Harper is an open-source Node.js performance platform that unifies database, cache, application, and messaging layers into one in-memory process.",
|
|
4
|
-
"version": "5.0.
|
|
4
|
+
"version": "5.0.21",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://harper.fast",
|
|
7
7
|
"bugs": {
|
package/resources/Table.ts
CHANGED
|
@@ -311,6 +311,8 @@ export function makeTable(options) {
|
|
|
311
311
|
ensureLoaded: false,
|
|
312
312
|
nodeId: event.nodeId,
|
|
313
313
|
viaNodeId: event.viaNodeId,
|
|
314
|
+
// use per-event expiresAt: batched txn context only holds the first event's expiration
|
|
315
|
+
expiresAt: event.expiresAt,
|
|
314
316
|
async: true,
|
|
315
317
|
};
|
|
316
318
|
const id = event.id;
|
|
@@ -1685,7 +1687,8 @@ export function makeTable(options) {
|
|
|
1685
1687
|
const type = fullUpdate ? 'put' : 'patch';
|
|
1686
1688
|
let residencyId: number | undefined;
|
|
1687
1689
|
if (options?.residencyId != undefined) residencyId = options.residencyId;
|
|
1688
|
-
const expiresAt: number =
|
|
1690
|
+
const expiresAt: number =
|
|
1691
|
+
options?.expiresAt ?? context?.expiresAt ?? (expirationMs ? expirationMs + Date.now() : -1);
|
|
1689
1692
|
const additionalAuditRefs: Array<{ version: number; nodeId: number }> = []; // track additional audit refs to store
|
|
1690
1693
|
|
|
1691
1694
|
if (precedesExisting <= 0) {
|
|
@@ -1902,7 +1905,7 @@ export function makeTable(options) {
|
|
|
1902
1905
|
updateIndices(id, existingRecord, recordToStore, transaction && { transaction });
|
|
1903
1906
|
|
|
1904
1907
|
writeCommit(true);
|
|
1905
|
-
if (
|
|
1908
|
+
if (expiresAt >= 0) scheduleCleanup(); // arm for replicated writes too, not just local-context writes
|
|
1906
1909
|
function writeCommit(storeRecord: boolean) {
|
|
1907
1910
|
// we need to write the commit. if storeRecord then we need to store the record, otherwise we just need to store the audit record
|
|
1908
1911
|
updateRecord(
|