@harperfast/harper 5.0.7 → 5.0.8
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/bin/status.js +2 -2
- package/bin/stop.js +5 -6
- package/components/OptionsWatcher.ts +9 -1
- package/dataLayer/harperBridge/TableSizeObject.ts +35 -0
- package/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbGetTableSize.ts +24 -0
- package/dist/bin/status.js +2 -2
- package/dist/bin/status.js.map +1 -1
- package/dist/bin/stop.js +5 -5
- package/dist/bin/stop.js.map +1 -1
- package/dist/components/OptionsWatcher.js +8 -1
- package/dist/components/OptionsWatcher.js.map +1 -1
- package/dist/dataLayer/harperBridge/TableSizeObject.d.ts +20 -0
- package/dist/dataLayer/harperBridge/TableSizeObject.js +32 -0
- package/dist/dataLayer/harperBridge/TableSizeObject.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbGetTableSize.d.ts +6 -6
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbGetTableSize.js +18 -19
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbGetTableSize.js.map +1 -1
- package/dist/resources/DatabaseTransaction.js +6 -1
- package/dist/resources/DatabaseTransaction.js.map +1 -1
- package/dist/resources/RecordEncoder.js +10 -1
- package/dist/resources/RecordEncoder.js.map +1 -1
- package/dist/resources/Table.js +13 -2
- package/dist/resources/Table.js.map +1 -1
- package/dist/resources/databases.js +2 -1
- package/dist/resources/databases.js.map +1 -1
- package/dist/resources/graphql.d.ts +3 -8
- package/dist/resources/graphql.js +180 -173
- package/dist/resources/graphql.js.map +1 -1
- package/dist/security/jsLoader.js +16 -2
- package/dist/security/jsLoader.js.map +1 -1
- package/dist/security/keys.js +1 -1
- package/dist/security/keys.js.map +1 -1
- package/dist/server/DurableSubscriptionsSession.js +2 -0
- package/dist/server/DurableSubscriptionsSession.js.map +1 -1
- package/dist/server/serverHelpers/serverUtilities.js +2 -2
- package/dist/server/serverHelpers/serverUtilities.js.map +1 -1
- package/dist/utility/environment/systemInformation.d.ts +178 -49
- package/dist/utility/environment/systemInformation.js +359 -219
- package/dist/utility/environment/systemInformation.js.map +1 -1
- package/dist/utility/operation_authorization.js +2 -2
- package/dist/utility/operation_authorization.js.map +1 -1
- package/package.json +2 -2
- package/resources/DatabaseTransaction.ts +8 -3
- package/resources/RecordEncoder.ts +9 -1
- package/resources/Table.ts +13 -2
- package/resources/databases.ts +2 -1
- package/resources/graphql.ts +13 -5
- package/security/jsLoader.ts +14 -2
- package/security/keys.js +1 -1
- package/server/DurableSubscriptionsSession.ts +1 -0
- package/server/serverHelpers/serverUtilities.ts +2 -5
- package/studio/web/assets/{index-C0And10y.js → index-BftP-yQ8.js} +2 -2
- package/studio/web/assets/{index-C0And10y.js.map → index-BftP-yQ8.js.map} +1 -1
- package/studio/web/index.html +1 -1
- package/utility/environment/systemInformation.ts +698 -0
- package/utility/operation_authorization.js +2 -5
- package/dataLayer/harperBridge/lmdbBridge/lmdbUtility/TableSizeObject.js +0 -25
- package/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbGetTableSize.js +0 -34
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/TableSizeObject.d.ts +0 -21
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/TableSizeObject.js +0 -24
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/TableSizeObject.js.map +0 -1
- package/utility/environment/systemInformation.js +0 -355
package/dist/resources/Table.js
CHANGED
|
@@ -325,6 +325,10 @@ function makeTable(options) {
|
|
|
325
325
|
// we listen for events by iterating through the async iterator provided by the subscription
|
|
326
326
|
for await (const event of subscription) {
|
|
327
327
|
try {
|
|
328
|
+
if (!event || typeof event !== 'object') {
|
|
329
|
+
logger_ts_1.logger.error?.('Bad subscription event', event);
|
|
330
|
+
continue;
|
|
331
|
+
}
|
|
328
332
|
const firstWrite = event.type === 'transaction' ? event.writes[0] : event;
|
|
329
333
|
if (!firstWrite) {
|
|
330
334
|
logger_ts_1.logger.error?.('Bad subscription event', event);
|
|
@@ -1321,7 +1325,8 @@ function makeTable(options) {
|
|
|
1321
1325
|
*/
|
|
1322
1326
|
static evict(id, existingRecord, existingVersion) {
|
|
1323
1327
|
let entry;
|
|
1324
|
-
|
|
1328
|
+
const lmdbTransaction = txnForContext({ transaction: new DatabaseTransaction_ts_1.DatabaseTransaction() });
|
|
1329
|
+
let transaction = lmdbTransaction.getReadTxn();
|
|
1325
1330
|
let options = { transaction };
|
|
1326
1331
|
try {
|
|
1327
1332
|
if (hasSourceGet || audit) {
|
|
@@ -1354,7 +1359,13 @@ function makeTable(options) {
|
|
|
1354
1359
|
}
|
|
1355
1360
|
}
|
|
1356
1361
|
finally {
|
|
1357
|
-
|
|
1362
|
+
if (primaryStore.ifVersion) {
|
|
1363
|
+
// LMDB: committing the wrapper calls doneReadTxn(), removing it from trackedTxns
|
|
1364
|
+
return lmdbTransaction.commit();
|
|
1365
|
+
}
|
|
1366
|
+
// RocksDB: eviction writes went directly into the raw transaction via options;
|
|
1367
|
+
// commit it directly, as DatabaseTransaction.commit() would abort it (no tracked writes)
|
|
1368
|
+
return transaction?.commit();
|
|
1358
1369
|
}
|
|
1359
1370
|
}
|
|
1360
1371
|
/**
|