querysub 0.464.0 → 0.465.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "querysub",
3
- "version": "0.464.0",
3
+ "version": "0.465.0",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "note1": "note on node-forge fork, see https://github.com/digitalbazaar/forge/issues/744 for details",
@@ -693,7 +693,8 @@ registerGetSpecForChildPath(path => {
693
693
 
694
694
  if (!remoteWatcher.hasAnyDirectPathWatches(path)) {
695
695
  // NOTE: This might mean that our Path Watcher and remote watcher are out of sync, which is a big problem and will break things.
696
- console.error(`We do not own a path, but also aren't watching it on a remote, but... we received the value? This is weird, and will probably break things (we will likely ignore this value / not trigger parent watches for it).`, { path });
696
+ // NOTE: Actually... this probably just means the real authority JUST disconnected, and we still had some trailing reads.
697
+ console.warn(`We do not own a path, but also aren't watching it on a remote, but... we received the value? This is weird, and will probably break things (we will likely ignore this value / not trigger parent watches for it).`, { path });
697
698
  }
698
699
  }
699
700
  return authorityLookup.getOurSpec();
@@ -89,7 +89,7 @@ export let ensureSubscribed = lazy(() => {
89
89
  }
90
90
  if (data.result.totalInternalLoopCount > 2) {
91
91
  statsData.callsWithCascadingRuns++;
92
- statsData.totalInternalRerunsForCascading += data.result.totalInternalLoopCount;
92
+ statsData.totalInternalRerunsForCascading += data.result.totalInternalLoopCount - 1;
93
93
  if (data.result.totalInternalLoopCount > statsData.maxInternalReruns) {
94
94
  statsData.maxInternalReruns = data.result.totalInternalLoopCount;
95
95
  }
@@ -116,8 +116,8 @@ export let ensureSubscribed = lazy(() => {
116
116
 
117
117
  let fnStats = statsData.perFunctionStats[data.functionId];
118
118
  fnStats.totalCalls++;
119
- fnStats.totalInternalReruns += data.result.totalInternalLoopCount;
120
- fnStats.totalFullReruns += data.result.outerLoopCount;
119
+ fnStats.totalInternalReruns += data.result.totalInternalLoopCount - 1;
120
+ fnStats.totalFullReruns += data.result.outerLoopCount - 1;
121
121
  addToStatsValue(fnStats.evalTimeStats, data.result.evalTime);
122
122
  addToStatsValue(fnStats.timeTakenStats, data.result.timeTaken);
123
123
  addToStatsValue(fnStats.totalTimeStats, data.result.totalTime);
@@ -127,7 +127,7 @@ export let ensureSubscribed = lazy(() => {
127
127
  }
128
128
  if (data.result.totalInternalLoopCount > 2) {
129
129
  fnStats.callsWithCascadingRuns++;
130
- fnStats.totalInternalRerunsForCascading += data.result.totalInternalLoopCount;
130
+ fnStats.totalInternalRerunsForCascading += data.result.totalInternalLoopCount - 1;
131
131
  if (data.result.totalInternalLoopCount > fnStats.maxInternalReruns) {
132
132
  fnStats.maxInternalReruns = data.result.totalInternalLoopCount;
133
133
  }