signalk-questdb 2.5.0 → 2.5.2

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.
@@ -76,7 +76,7 @@ export interface UnstorableStatus {
76
76
  export interface RestoreStatus {
77
77
  /** Vessels replayed into the Signal K model. */
78
78
  contexts: number;
79
- /** Contexts skipped because the vessel had already transmitted. */
79
+ /** Contexts skipped because the Signal K model already held their position. */
80
80
  skippedLive: number;
81
81
  /** True when the restore threw; `contexts` is then not meaningful. */
82
82
  failed: boolean;
@@ -60,7 +60,7 @@ export const ConfigSchema = Type.Object({
60
60
  minimum: 500,
61
61
  maximum: 300000,
62
62
  title: "Write batch interval (ms)",
63
- description: "How often buffered samples are committed to QuestDB. Each commit is one WAL transaction per table, so short intervals create huge numbers of tiny transactions whose apply cost eventually stalls recording on Pi-class hardware — QuestDB recommends >100 rows per transaction and its console flags tables below that (see README, 'Small transactions' alert). Longer intervals mean at most this many ms of buffered data is lost on a hard crash.",
63
+ description: "How often buffered samples are committed to QuestDB. Each commit is one WAL transaction per table, so short intervals create huge numbers of tiny transactions whose apply cost eventually stalls recording on Pi-class hardware — QuestDB recommends >100 rows per transaction and its console flags tables below that (see doc/deployment.md, 'Small transactions' alert). Longer intervals mean at most this many ms of buffered data is lost on a hard crash.",
64
64
  }),
65
65
  samplingRates: Type.Record(Type.String(), Type.Number(), {
66
66
  default: {},
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAU,MAAM,SAAS,CAAC;AAEvC,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC;IACtC,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC;QACvB,OAAO,EAAE,WAAW;QACpB,KAAK,EAAE,cAAc;QACrB,WAAW,EACT,oHAAoH;KACvH,CAAC;IACF,cAAc,EAAE,IAAI,CAAC,MAAM,CAAC;Q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AA0D;QAC1D,aAAa,EAAE,MAAM,CAAC,aAAa,KAAK,KAAK;QAC7C,wEAAwE;QACxE,iDAAiD;QACjD,eAAe,EAAE,MAAM,CAAC,eAAe,KAAK,KAAK;QACjD,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC;YAC9C,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CACxB,CAAC,CAAC,EAAe,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,CAC7D;YACH,CAAC,CAAC,EAAE;QACN,wBAAwB,EACtB,OAAO,MAAM,CAAC,wBAAwB,KAAK,QAAQ;YACnD,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,wBAAwB,CAAC;YAChD,MAAM,CAAC,wBAAwB,IAAI,CAAC;YAClC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,wBAAwB,CAAC;YAC7C,CAAC,CAAC,EAAE;QACR,sEAAsE;QACtE,uEAAuE;QACvE,qEAAqE;QACrE,kEAAkE;QAClE,qEAAqE;QACrE,qBAAqB;QACrB,kBAAkB,EAAE,MAAM,CAAC,kBAAkB,IAAI,MAAM;QACvD,eAAe,EAAE,MAAM,CAAC,eAAe,IAAI,GAAG;KAC/C,CAAC;AACJ,CAAC"}
package/dist/index.js CHANGED
@@ -255,13 +255,6 @@ export default (app) => {
255
255
  return;
256
256
  app.setPluginStatus(recordingStatus(host, port));
257
257
  };
258
- // Contexts seen live while a startup restore is in flight. A stored fix
259
- // must never overwrite a vessel that has already transmitted since boot —
260
- // that would move it backwards on the chart. Populated by the recorder
261
- // subscription and cleared as soon as the restore settles, so this stays a
262
- // startup-window set rather than an unbounded one.
263
- const liveContexts = new Set();
264
- let trackLiveContexts = false;
265
258
  const withLifecycleLock = (fn) => {
266
259
  const run = lifecycleChain.then(fn, fn);
267
260
  // Keep the chain alive regardless of this op's outcome.
@@ -1189,10 +1182,6 @@ export default (app) => {
1189
1182
  app.registerHistoryApiProvider(v2Provider);
1190
1183
  const v1Provider = createHistoryProviderV1(queryClient, app.selfContext, (msg) => app.debug(msg), archive);
1191
1184
  app.registerHistoryProvider(v1Provider);
1192
- // Arm live-context tracking before the first delta can arrive, so the
1193
- // restore sees every vessel that transmitted during startup.
1194
- liveContexts.clear();
1195
- trackLiveContexts = config.restoreOnStart;
1196
1185
  // getBus() carries only the source that Signal K's source priorities
1197
1186
  // prefer on each path, the value instruments show. recordAllSources
1198
1187
  // reads the unfiltered bus instead, so a source that loses the ranking
@@ -1207,10 +1196,8 @@ export default (app) => {
1207
1196
  const { path, value, context } = delta;
1208
1197
  // Values this plugin replayed at startup come straight back around
1209
1198
  // through the streambundle. Recording them would re-stamp historical
1210
- // fixes with the current receive time — inventing present-tense
1211
- // positions for vessels that may be long gone — and marking their
1212
- // context live would defeat the guard that stops a restore from
1213
- // overwriting a vessel that actually transmitted.
1199
+ // fixes with the current receive time, inventing present-tense
1200
+ // positions for vessels that may be long gone.
1214
1201
  if (delta.$source === RESTORE_SOURCE)
1215
1202
  return;
1216
1203
  // The delta's sourceRef, stored as the rows' `source` column so
@@ -1231,18 +1218,9 @@ export default (app) => {
1231
1218
  // describe a path (units, description, displayName), they are not a
1232
1219
  // reading of it. Routed like a value object, their keys were stored
1233
1220
  // as rows such as `….units` and `….displayName`, again each time a
1234
- // plugin republished its meta. Nor do they show that a vessel is
1235
- // transmitting: a local plugin publishes its meta on its own start,
1236
- // and counting that would cost the restore a vessel's saved position.
1221
+ // plugin republished its meta.
1237
1222
  if (delta.isMeta)
1238
1223
  return;
1239
- // Note the context BEFORE any early return or filter: identity-only
1240
- // deltas return below, and path filters and throttles decide what gets
1241
- // STORED — but any value at all proves the vessel is transmitting now,
1242
- // which is what makes its stored position obsolete for the restore.
1243
- if (trackLiveContexts) {
1244
- liveContexts.add(context === app.selfContext ? "self" : context);
1245
- }
1246
1224
  // Static vessel identity (issue #91): names arrive as empty-path
1247
1225
  // object deltas, which the path guard below would drop. Stored as
1248
1226
  // path "name" in the string table; history-v1 replays them in the
@@ -1572,11 +1550,10 @@ export default (app) => {
1572
1550
  // reads pluginRunning and everything before this point can still throw
1573
1551
  // and abandon the start.
1574
1552
  //
1575
- // The recorder is already subscribed, so live deltas keep arriving while
1576
- // the (slow, whole-table) restore query runs. Those are newer by
1577
- // definition: replaying a stored fix over a vessel that just transmitted
1578
- // would move it BACKWARDS on the chart. liveContexts records what the
1579
- // recorder saw and the restore skips those contexts entirely.
1553
+ // Live deltas keep arriving while the (slow, whole-table) restore query
1554
+ // runs, and some arrived before the recorder subscribed. The restore
1555
+ // reads the model and leaves alone whatever it already holds, so neither
1556
+ // is overwritten by an older stored value.
1580
1557
  if (config.restoreOnStart) {
1581
1558
  const restoreGeneration = lifecycleGeneration;
1582
1559
  void restoreFromHistory({
@@ -1591,7 +1568,7 @@ export default (app) => {
1591
1568
  },
1592
1569
  selfContext: app.selfContext,
1593
1570
  debug: (msg) => app.debug(msg),
1594
- hasLiveData: (context) => liveContexts.has(context),
1571
+ getPath: (path) => app.getPath?.(path),
1595
1572
  }, {
1596
1573
  maxAgeMs: config.restoreMaxAgeMinutes * 60_000,
1597
1574
  restoreSelf: config.recordSelf,
@@ -1631,16 +1608,6 @@ export default (app) => {
1631
1608
  const { host, port } = questdbEndpoints.ilp;
1632
1609
  publishRecordingStatus(host, port);
1633
1610
  }
1634
- })
1635
- .finally(() => {
1636
- // Only needed to shield the restore; tracking every context for the
1637
- // life of the plugin would be an unbounded set. Guarded on the
1638
- // generation so a slow restore settling after a restart does not
1639
- // disarm the tracking the NEW start just armed.
1640
- if (lifecycleGeneration !== restoreGeneration)
1641
- return;
1642
- liveContexts.clear();
1643
- trackLiveContexts = false;
1644
1611
  });
1645
1612
  }
1646
1613
  }
@@ -1681,10 +1648,6 @@ export default (app) => {
1681
1648
  startAbort?.abort();
1682
1649
  imageCheckAbort?.abort();
1683
1650
  pluginRunning = false;
1684
- // A start aborted before its restore ran would otherwise leave tracking
1685
- // armed, accumulating contexts for a restore that never happens.
1686
- trackLiveContexts = false;
1687
- liveContexts.clear();
1688
1651
  // Stale across a restart otherwise: the card would still claim a
1689
1652
  // restore count from the previous run.
1690
1653
  restoreSummary = null;