signalk-questdb 2.0.1 → 2.1.1

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 (91) hide show
  1. package/.coderabbit.yaml +4 -3
  2. package/README.md +151 -5
  3. package/dist/api-contract.d.ts +62 -0
  4. package/dist/config/schema.d.ts +1 -0
  5. package/dist/config/schema.js +5 -0
  6. package/dist/config/schema.js.map +1 -1
  7. package/dist/configpanel/responses.d.ts +33 -1
  8. package/dist/configpanel/responses.js +89 -0
  9. package/dist/configpanel/responses.js.map +1 -1
  10. package/dist/history-v1.js +12 -9
  11. package/dist/history-v1.js.map +1 -1
  12. package/dist/history-v2.d.ts +18 -6
  13. package/dist/history-v2.js +275 -41
  14. package/dist/history-v2.js.map +1 -1
  15. package/dist/ilp-writer.d.ts +22 -0
  16. package/dist/ilp-writer.js +76 -4
  17. package/dist/ilp-writer.js.map +1 -1
  18. package/dist/index.d.ts +1 -0
  19. package/dist/index.js +326 -58
  20. package/dist/index.js.map +1 -1
  21. package/dist/influx-detect.d.ts +19 -0
  22. package/dist/influx-detect.js +165 -0
  23. package/dist/influx-detect.js.map +1 -0
  24. package/dist/migration.d.ts +147 -0
  25. package/dist/migration.js +819 -0
  26. package/dist/migration.js.map +1 -0
  27. package/dist/query-client.d.ts +9 -0
  28. package/dist/query-client.js +11 -0
  29. package/dist/query-client.js.map +1 -1
  30. package/dist/restore.js +9 -0
  31. package/dist/restore.js.map +1 -1
  32. package/dist/schema-errors.d.ts +15 -0
  33. package/dist/schema-errors.js +38 -0
  34. package/dist/schema-errors.js.map +1 -0
  35. package/package.json +5 -4
  36. package/public/assets/PluginConfigurationPanel-CR4mD9IH.js +9 -0
  37. package/public/assets/{index-Z7eUk0W6.js → index-CyI4zKUm.js} +1 -1
  38. package/public/assets/{virtualExposes-CyrNon4j.js → virtualExposes-BBIkbTtD.js} +1 -1
  39. package/public/remoteEntry.js +1 -1
  40. package/dist/test/config.test.d.ts +0 -1
  41. package/dist/test/config.test.js +0 -161
  42. package/dist/test/config.test.js.map +0 -1
  43. package/dist/test/configpanel-responses.test.d.ts +0 -1
  44. package/dist/test/configpanel-responses.test.js +0 -108
  45. package/dist/test/configpanel-responses.test.js.map +0 -1
  46. package/dist/test/console-proxy.test.d.ts +0 -1
  47. package/dist/test/console-proxy.test.js +0 -664
  48. package/dist/test/console-proxy.test.js.map +0 -1
  49. package/dist/test/container-env.test.d.ts +0 -1
  50. package/dist/test/container-env.test.js +0 -70
  51. package/dist/test/container-env.test.js.map +0 -1
  52. package/dist/test/delta-routing.test.d.ts +0 -1
  53. package/dist/test/delta-routing.test.js +0 -258
  54. package/dist/test/delta-routing.test.js.map +0 -1
  55. package/dist/test/full-export-range.test.d.ts +0 -1
  56. package/dist/test/full-export-range.test.js +0 -78
  57. package/dist/test/full-export-range.test.js.map +0 -1
  58. package/dist/test/history-v1.test.d.ts +0 -1
  59. package/dist/test/history-v1.test.js +0 -676
  60. package/dist/test/history-v1.test.js.map +0 -1
  61. package/dist/test/history-v2.test.d.ts +0 -1
  62. package/dist/test/history-v2.test.js +0 -563
  63. package/dist/test/history-v2.test.js.map +0 -1
  64. package/dist/test/host-limits.test.d.ts +0 -1
  65. package/dist/test/host-limits.test.js +0 -81
  66. package/dist/test/host-limits.test.js.map +0 -1
  67. package/dist/test/ilp-writer.test.d.ts +0 -1
  68. package/dist/test/ilp-writer.test.js +0 -391
  69. package/dist/test/ilp-writer.test.js.map +0 -1
  70. package/dist/test/package-e2e.test.d.ts +0 -1
  71. package/dist/test/package-e2e.test.js +0 -306
  72. package/dist/test/package-e2e.test.js.map +0 -1
  73. package/dist/test/path-matcher.test.d.ts +0 -1
  74. package/dist/test/path-matcher.test.js +0 -224
  75. package/dist/test/path-matcher.test.js.map +0 -1
  76. package/dist/test/query-client.test.d.ts +0 -1
  77. package/dist/test/query-client.test.js +0 -299
  78. package/dist/test/query-client.test.js.map +0 -1
  79. package/dist/test/questdb-endpoint.test.d.ts +0 -1
  80. package/dist/test/questdb-endpoint.test.js +0 -297
  81. package/dist/test/questdb-endpoint.test.js.map +0 -1
  82. package/dist/test/restore.test.d.ts +0 -1
  83. package/dist/test/restore.test.js +0 -496
  84. package/dist/test/restore.test.js.map +0 -1
  85. package/dist/test/time-range.test.d.ts +0 -1
  86. package/dist/test/time-range.test.js +0 -53
  87. package/dist/test/time-range.test.js.map +0 -1
  88. package/dist/test/wal-monitor.test.d.ts +0 -1
  89. package/dist/test/wal-monitor.test.js +0 -405
  90. package/dist/test/wal-monitor.test.js.map +0 -1
  91. package/public/assets/PluginConfigurationPanel-CyS3A7gD.js +0 -9
@@ -1,405 +0,0 @@
1
- import { describe, it } from "node:test";
2
- import assert from "node:assert/strict";
3
- import { WalMonitor, buildPendingSegmentsSQL, computeSkipPlan, extractApplyError, isPartitionOpenFailure, skipPlansEqual, } from "../wal-monitor.js";
4
- function segment(overrides = {}) {
5
- return {
6
- walId: 33,
7
- segmentId: 20,
8
- txns: 6,
9
- minTxn: 4672112,
10
- maxTxn: 4672117,
11
- minTimestamp: "2026-07-01T04:22:14.701496Z",
12
- maxTimestamp: "2026-07-01T04:22:17.204514Z",
13
- ...overrides,
14
- };
15
- }
16
- function suspendedTable(overrides = {}) {
17
- return {
18
- name: "signalk_str",
19
- writerTxn: 4672111,
20
- sequencerTxn: 5456609,
21
- txnLag: 784498,
22
- errorTag: "",
23
- errorMessage: "",
24
- ...overrides,
25
- };
26
- }
27
- describe("buildPendingSegmentsSQL", () => {
28
- it("targets wal_transactions of the table with a strict txn lower bound", () => {
29
- const sql = buildPendingSegmentsSQL("signalk_str", 4672111);
30
- assert.match(sql, /FROM wal_transactions\('signalk_str'\)/);
31
- assert.match(sql, /WHERE sequencerTxn > 4672111 /);
32
- assert.match(sql, /GROUP BY walId, segmentId ORDER BY minTxn/);
33
- });
34
- it("escapes single quotes in the table name", () => {
35
- const sql = buildPendingSegmentsSQL("bad'name", 1);
36
- assert.match(sql, /wal_transactions\('bad''name'\)/);
37
- });
38
- it("floors and clamps the writer txn", () => {
39
- assert.match(buildPendingSegmentsSQL("t", 12.9), /> 12 /);
40
- assert.match(buildPendingSegmentsSQL("t", -5), /> 0 /);
41
- });
42
- });
43
- describe("computeSkipPlan", () => {
44
- it("returns null when there are no pending segments", () => {
45
- assert.equal(computeSkipPlan([]), null);
46
- });
47
- it("skips to the first txn of the next segment", () => {
48
- const plan = computeSkipPlan([
49
- segment(),
50
- segment({
51
- walId: 34,
52
- segmentId: 0,
53
- txns: 41499,
54
- minTxn: 4672118,
55
- maxTxn: 4713616,
56
- minTimestamp: "2026-07-01T04:50:02.387389Z",
57
- maxTimestamp: "2026-07-01T12:22:51.865153Z",
58
- }),
59
- ]);
60
- assert.ok(plan);
61
- assert.equal(plan.skipToTxn, 4672118);
62
- assert.equal(plan.skippedTxns, 6);
63
- assert.equal(plan.skipWindowStart, "2026-07-01T04:22:14.701496Z");
64
- assert.equal(plan.skipWindowEnd, "2026-07-01T04:22:17.204514Z");
65
- assert.equal(plan.walId, 33);
66
- assert.equal(plan.segmentId, 20);
67
- assert.equal(plan.tailSkip, false);
68
- });
69
- it("flags a tail skip when the stuck segment is the newest", () => {
70
- const plan = computeSkipPlan([segment()]);
71
- assert.ok(plan);
72
- assert.equal(plan.skipToTxn, 4672118);
73
- assert.equal(plan.tailSkip, true);
74
- });
75
- });
76
- describe("skipPlansEqual", () => {
77
- const plan = {
78
- skipToTxn: 4672118,
79
- skippedTxns: 6,
80
- skipWindowStart: "2026-07-01T04:22:14.701496Z",
81
- skipWindowEnd: "2026-07-01T04:22:17.204514Z",
82
- walId: 33,
83
- segmentId: 20,
84
- tailSkip: false,
85
- };
86
- it("accepts an identical confirmation (including a JSON round-trip)", () => {
87
- assert.equal(skipPlansEqual(plan, { ...plan }), true);
88
- assert.equal(skipPlansEqual(plan, JSON.parse(JSON.stringify(plan))), true);
89
- });
90
- it("rejects non-object confirmations", () => {
91
- assert.equal(skipPlansEqual(plan, undefined), false);
92
- assert.equal(skipPlansEqual(plan, null), false);
93
- assert.equal(skipPlansEqual(plan, 4672118), false);
94
- });
95
- it("rejects when any field diverges — same target txn is not enough", () => {
96
- assert.equal(skipPlansEqual(plan, { ...plan, skippedTxns: 12000 }), false);
97
- assert.equal(skipPlansEqual(plan, { ...plan, skipWindowEnd: "2026-07-05T00:00:00Z" }), false);
98
- assert.equal(skipPlansEqual(plan, { ...plan, tailSkip: true }), false);
99
- assert.equal(skipPlansEqual(plan, { ...plan, walId: 34 }), false);
100
- assert.equal(skipPlansEqual(plan, { ...plan, segmentId: 21 }), false);
101
- assert.equal(skipPlansEqual(plan, { ...plan, skipToTxn: 4672119 }), false);
102
- });
103
- });
104
- describe("extractApplyError", () => {
105
- const failure = [
106
- "2026-07-17T22:22:51.774951Z C i.q.c.w.ApplyWal2TableJob job failed, table suspended [table=signalk_str~8, seqTxn=4672112, error=java.lang.AssertionError",
107
- "\tat io.questdb.cairo.VarcharTypeDriver.getDataVectorSize(VarcharTypeDriver.java:175)",
108
- "\tat io.questdb.cairo.TableWriter.processWalCommitBlock(TableWriter.java:9965)",
109
- "]",
110
- ];
111
- it("returns null when no failure is present", () => {
112
- assert.equal(extractApplyError(["2026-07-17T22:22:51Z I job finished [table=x]"]), null);
113
- });
114
- it("captures the failure line and its stack up to the closing bracket", () => {
115
- const lines = [
116
- "2026-07-17T22:22:50Z I i.q.c.TableWriter open 'signalk_str~8'",
117
- ...failure,
118
- "2026-07-17T22:22:56Z I i.q.c.w.ApplyWal2TableJob job finished [table=signalk~7]",
119
- ];
120
- const error = extractApplyError(lines);
121
- assert.ok(error);
122
- assert.match(error, /job failed, table suspended/);
123
- assert.match(error, /VarcharTypeDriver.getDataVectorSize/);
124
- assert.ok(error.endsWith("]"));
125
- assert.doesNotMatch(error, /job finished/);
126
- });
127
- it("uses the LAST failure when several are present", () => {
128
- const older = failure.map((l) => l.replace("AssertionError", "OldError"));
129
- const error = extractApplyError([...older, ...failure]);
130
- assert.ok(error);
131
- assert.match(error, /AssertionError/);
132
- assert.doesNotMatch(error, /OldError/);
133
- });
134
- it("stops at the next timestamped entry when no bracket closes the stack", () => {
135
- const error = extractApplyError([
136
- failure[0],
137
- failure[1],
138
- "2026-07-17T22:22:52Z I unrelated next entry",
139
- ]);
140
- assert.ok(error);
141
- assert.doesNotMatch(error, /unrelated/);
142
- });
143
- it("scopes to the requested table when several tables have failures", () => {
144
- const otherFailure = failure.map((l) => l
145
- .replace("signalk_str~8", "signalk~7")
146
- .replace("AssertionError", "OtherTableError"));
147
- // The other table failed LAST — an unscoped scrape would return it.
148
- const lines = [...failure, ...otherFailure];
149
- const strError = extractApplyError(lines, "signalk_str");
150
- assert.ok(strError);
151
- assert.match(strError, /AssertionError/);
152
- assert.doesNotMatch(strError, /OtherTableError/);
153
- const skError = extractApplyError(lines, "signalk");
154
- assert.ok(skError);
155
- assert.match(skError, /OtherTableError/);
156
- assert.equal(extractApplyError(lines, "signalk_position"), null);
157
- });
158
- });
159
- function makeHarness(options = {}) {
160
- let suspended = [];
161
- let resumeFailure = null;
162
- let clock = 1_000_000;
163
- const harness = {
164
- resumeCalls: [],
165
- suspendedCalls: [],
166
- resolvedCalls: 0,
167
- errors: [],
168
- };
169
- const deps = {
170
- listSuspended: async () => {
171
- if (options.failListWith)
172
- throw options.failListWith;
173
- return suspended;
174
- },
175
- resumeTable: async (name) => {
176
- harness.resumeCalls.push(name);
177
- if (resumeFailure)
178
- throw resumeFailure;
179
- },
180
- onSuspended: (tables, anyFailed) => {
181
- harness.suspendedCalls.push({
182
- names: tables.map((t) => t.name),
183
- anyFailed,
184
- });
185
- },
186
- onResolved: () => {
187
- harness.resolvedCalls++;
188
- },
189
- debug: () => { },
190
- error: (msg) => {
191
- harness.errors.push(msg);
192
- },
193
- };
194
- harness.monitor = new WalMonitor(deps, {
195
- retryMinMs: options.retryMinMs ?? 10 * 60_000,
196
- now: () => clock,
197
- });
198
- harness.setSuspended = (tables) => {
199
- suspended = tables;
200
- };
201
- harness.setResumeFailing = (error) => {
202
- resumeFailure = error;
203
- };
204
- harness.advance = (ms) => {
205
- clock += ms;
206
- };
207
- return harness;
208
- }
209
- describe("WalMonitor", () => {
210
- it("attempts one lossless resume on a new suspension and reports pending", async () => {
211
- const h = makeHarness();
212
- h.setSuspended([suspendedTable()]);
213
- await h.monitor.check();
214
- assert.deepEqual(h.resumeCalls, ["signalk_str"]);
215
- assert.equal(h.monitor.outcomeFor("signalk_str"), "pending");
216
- assert.deepEqual(h.suspendedCalls, [
217
- { names: ["signalk_str"], anyFailed: false },
218
- ]);
219
- // The snapshot (writerTxn/sequencerTxn/error columns) must be persisted
220
- // to the log the moment the suspension is seen — the engine-side detail
221
- // does not survive a container recreate.
222
- assert.match(h.errors[0], /writerTxn=4672111/);
223
- });
224
- it("locks the episode to failed when re-suspended at the same writerTxn", async () => {
225
- const h = makeHarness();
226
- h.setSuspended([suspendedTable()]);
227
- await h.monitor.check();
228
- await h.monitor.check();
229
- assert.equal(h.monitor.outcomeFor("signalk_str"), "failed");
230
- assert.deepEqual(h.resumeCalls, ["signalk_str"]);
231
- assert.equal(h.suspendedCalls[1].anyFailed, true);
232
- // Still failed on later checks; never resumes again on its own.
233
- await h.monitor.check();
234
- assert.deepEqual(h.resumeCalls, ["signalk_str"]);
235
- assert.equal(h.monitor.outcomeFor("signalk_str"), "failed");
236
- });
237
- it("starts a fresh episode when the writer advances to a new stall point", async () => {
238
- const h = makeHarness();
239
- h.setSuspended([suspendedTable({ writerTxn: 100 })]);
240
- await h.monitor.check();
241
- await h.monitor.check();
242
- assert.equal(h.monitor.outcomeFor("signalk_str"), "failed");
243
- h.setSuspended([suspendedTable({ writerTxn: 200 })]);
244
- await h.monitor.check();
245
- assert.deepEqual(h.resumeCalls, ["signalk_str", "signalk_str"]);
246
- assert.equal(h.monitor.outcomeFor("signalk_str"), "pending");
247
- });
248
- it("reports resolution exactly once when the suspension clears", async () => {
249
- const h = makeHarness();
250
- h.setSuspended([suspendedTable()]);
251
- await h.monitor.check();
252
- h.setSuspended([]);
253
- await h.monitor.check();
254
- await h.monitor.check();
255
- assert.equal(h.resolvedCalls, 1);
256
- assert.equal(h.monitor.outcomeFor("signalk_str"), null);
257
- });
258
- it("rate-limits resumes across a resume/clear/re-suspend flap at one stall point", async () => {
259
- const h = makeHarness();
260
- h.setSuspended([suspendedTable()]);
261
- await h.monitor.check();
262
- // Replay makes the table look healthy for one check, then it re-suspends
263
- // at the same writerTxn (a slow re-failure).
264
- h.setSuspended([]);
265
- await h.monitor.check();
266
- h.setSuspended([suspendedTable()]);
267
- await h.monitor.check();
268
- assert.deepEqual(h.resumeCalls, ["signalk_str"]);
269
- // After the gap passes, one more automatic attempt is allowed.
270
- h.advance(11 * 60_000);
271
- h.setSuspended([]);
272
- await h.monitor.check();
273
- h.setSuspended([suspendedTable()]);
274
- await h.monitor.check();
275
- assert.deepEqual(h.resumeCalls, ["signalk_str", "signalk_str"]);
276
- });
277
- it("does not classify a failed resume REQUEST as unreadable data", async () => {
278
- const h = makeHarness();
279
- h.setResumeFailing(new Error("table busy"));
280
- h.setSuspended([suspendedTable()]);
281
- await h.monitor.check();
282
- assert.equal(h.monitor.outcomeFor("signalk_str"), "pending");
283
- // The request never executed, so the next check must NOT escalate to
284
- // "failed" (the panel reads that as corruption) — it stays pending.
285
- await h.monitor.check();
286
- assert.equal(h.monitor.outcomeFor("signalk_str"), "pending");
287
- // Once the retry gap passes and a resume actually executes, a
288
- // re-suspension at the same writerTxn is real evidence — now it fails.
289
- h.setResumeFailing(null);
290
- h.advance(11 * 60_000);
291
- await h.monitor.check();
292
- assert.equal(h.monitor.outcomeFor("signalk_str"), "pending");
293
- await h.monitor.check();
294
- assert.equal(h.monitor.outcomeFor("signalk_str"), "failed");
295
- assert.deepEqual(h.resumeCalls, ["signalk_str", "signalk_str"]);
296
- });
297
- it("does nothing after stop()", async () => {
298
- const h = makeHarness();
299
- h.setSuspended([suspendedTable()]);
300
- h.monitor.stop();
301
- await h.monitor.check();
302
- assert.deepEqual(h.resumeCalls, []);
303
- assert.deepEqual(h.suspendedCalls, []);
304
- });
305
- it("survives a failing wal_tables() probe", async () => {
306
- const h = makeHarness({ failListWith: new Error("connection refused") });
307
- await h.monitor.check();
308
- assert.deepEqual(h.suspendedCalls, []);
309
- assert.equal(h.resolvedCalls, 0);
310
- });
311
- it("handles multiple tables independently", async () => {
312
- const h = makeHarness();
313
- h.setSuspended([
314
- suspendedTable(),
315
- suspendedTable({ name: "signalk", writerTxn: 900 }),
316
- ]);
317
- await h.monitor.check();
318
- assert.deepEqual(h.resumeCalls, ["signalk_str", "signalk"]);
319
- // signalk recovers, signalk_str stays stuck.
320
- h.setSuspended([suspendedTable()]);
321
- await h.monitor.check();
322
- assert.equal(h.monitor.outcomeFor("signalk_str"), "failed");
323
- assert.equal(h.monitor.outcomeFor("signalk"), null);
324
- // Not fully resolved while one table is still suspended.
325
- assert.equal(h.resolvedCalls, 0);
326
- });
327
- });
328
- describe("isPartitionOpenFailure", () => {
329
- // Field report (issue #81): power loss left the `_txn` commit record
330
- // claiming 1,403,951 rows while the column files held 1,402,837. The writer
331
- // asserts while OPENING the partition, before it reads any transaction, so
332
- // every RESUME WAL variant re-hits it.
333
- const partitionOpenStack = [
334
- "2026-07-21T07:35:50.072000Z C i.q.c.w.ApplyWal2TableJob job failed, table suspended [table=signalk_str~8, seqTxn=57606, error=java.lang.AssertionError",
335
- "\tat io.questdb.cairo.VarcharTypeDriver.getDataVectorSize(VarcharTypeDriver.java:175)",
336
- "\tat io.questdb.cairo.TableReader.openPartition(TableReader.java:1234)",
337
- "]",
338
- ];
339
- // The class we shipped the guided skip for: the failure is in the pending
340
- // WAL segment's own files, which a bounded skip really can get past.
341
- const segmentStack = [
342
- "2026-07-17T22:22:51.000000Z C i.q.c.w.ApplyWal2TableJob job failed, table suspended [table=signalk_str~8, seqTxn=4672118, error=java.lang.AssertionError",
343
- "\tat io.questdb.cairo.VarcharTypeDriver.getDataVectorSize(VarcharTypeDriver.java:175)",
344
- "\tat io.questdb.cairo.wal.TableWriterSegmentFileCache.mmapSegments(TableWriterSegmentFileCache.java:200)",
345
- "]",
346
- ];
347
- it("detects a failure while opening the applied partition", () => {
348
- assert.equal(isPartitionOpenFailure(extractApplyError(partitionOpenStack)), true);
349
- });
350
- it("does not flag an unreadable WAL segment, which a skip can repair", () => {
351
- assert.equal(isPartitionOpenFailure(extractApplyError(segmentStack)), false);
352
- });
353
- it("detects every partition-open frame the classifier accepts", () => {
354
- // Each alternative in the pattern is a distinct way the writer reports
355
- // dying before it reads a transaction; an untested one can silently stop
356
- // matching.
357
- const frames = [
358
- "io.questdb.cairo.TableReader.openPartition(TableReader.java:1234)",
359
- "io.questdb.cairo.TableWriter.openLastPartition(TableWriter.java:4242)",
360
- "io.questdb.cairo.TxReader.unsafeLoadAll(TxReader.java:311)",
361
- "io.questdb.cairo.ColumnVersionReader.readUnsafe(ColumnVersionReader.java:98)",
362
- ];
363
- for (const frame of frames) {
364
- const log = [
365
- "2026-07-21T07:35:50.072000Z C i.q.c.w.ApplyWal2TableJob job failed, table suspended [table=signalk_str~8, error=java.lang.AssertionError",
366
- `\tat ${frame}`,
367
- "]",
368
- ];
369
- assert.equal(isPartitionOpenFailure(extractApplyError(log)), true, `expected ${frame} to classify as a partition-open failure`);
370
- }
371
- });
372
- it("does not classify on the table name or error prose", () => {
373
- // The captured entry includes QuestDB's `[table=..., error=...]` header.
374
- // Matching a bare word anywhere in it would misfire on a user's table
375
- // name or on wording inside an unrelated error — and a false positive
376
- // withholds a skip that would actually have repaired the table.
377
- const tableNamed = [
378
- "2026-07-21T07:35:50.072000Z C i.q.c.w.ApplyWal2TableJob job failed, table suspended [table=openPartition~3, error=io.questdb.cairo.CairoException: could not open, out of disk space",
379
- "]",
380
- ];
381
- const prose = [
382
- "2026-07-21T07:35:50.072000Z C i.q.c.w.ApplyWal2TableJob job failed, table suspended [table=signalk~3, error=io.questdb.cairo.CairoException: openPartition budget exceeded",
383
- "]",
384
- ];
385
- assert.equal(isPartitionOpenFailure(extractApplyError(tableNamed)), false);
386
- assert.equal(isPartitionOpenFailure(extractApplyError(prose)), false);
387
- });
388
- it("does not classify a same-named frame from another library", () => {
389
- // The method names are not unique to QuestDB; without the namespace
390
- // anchor an unrelated dependency's frame would suppress a valid skip.
391
- const foreign = [
392
- "2026-07-21T07:35:50.072000Z C i.q.c.w.ApplyWal2TableJob job failed, table suspended [table=signalk~3, error=java.lang.AssertionError",
393
- "\tat com.example.storage.Writer.openPartition(Writer.java:88)",
394
- "]",
395
- ];
396
- assert.equal(isPartitionOpenFailure(extractApplyError(foreign)), false);
397
- });
398
- it("treats a missing diagnosis as not-this-class", () => {
399
- // No engine log (container recreated, log API unavailable): must not
400
- // withhold the skip on speculation.
401
- assert.equal(isPartitionOpenFailure(null), false);
402
- assert.equal(isPartitionOpenFailure(""), false);
403
- });
404
- });
405
- //# sourceMappingURL=wal-monitor.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wal-monitor.test.js","sourceRoot":"","sources":["../../src/test/wal-monitor.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EACL,UAAU,EACV,uBAAuB,EACvB,eAAe,EACf,iBAAiB,EACjB,sBAAsB,EACtB,cAAc,GAKf,MAAM,mBAAmB,CAAC;AAE3B,SAAS,OAAO,CAAC,YAAqC,EAAE;IACtD,OAAO;QACL,KAAK,EAAE,EAAE;QACT,SAAS,EAAE,EAAE;QACb,IAAI,EAAE,CAAC;QACP,MAAM,EAAE,OAAO;QACf,MAAM,EAAE,OAAO;QACf,YAAY,EAAE,6BAA6B;QAC3C,YAAY,EAAE,6BAA6B;QAC3C,GAAG,SAAS;KACb,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CACrB,YAAqC,EAAE;IAEvC,OAAO;QACL,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE,OAAO;QAClB,YAAY,EAAE,OAAO;QACrB,MA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+0,0 @@
1
- import{a as e,i as t,n,r,t as i}from"./_virtual_mf___mfe_internal__signalk_questdb__mf_owner__1__loadShare__react__loadShare__.js-DzhF4wXp.js";var a={root:{fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`,color:`#333`,padding:`16px 0`},sectionToggle:{color:`#555`,display:`flex`,alignItems:`center`,gap:6,width:`100%`,textAlign:`left`,background:`none`,border:`none`,padding:0,cursor:`pointer`,userSelect:`none`},sectionMarker:{fontSize:11,transition:`transform 0.15s`},sectionTitle:{fontSize:13,fontWeight:600,color:`#888`,textTransform:`uppercase`,letterSpacing:`0.05em`,marginBottom:10,marginTop:24},btn:{display:`inline-flex`,alignItems:`center`,gap:8,padding:`8px 16px`,border:`none`,borderRadius:6,fontSize:13,fontWeight:600,cursor:`pointer`},btnPrimary:{background:`#3b82f6`,color:`#fff`},btnSecondary:{background:`#f1f5f9`,color:`#475569`,border:`1px solid #e2e8f0`},btnWarn:{background:`#f59e0b`,color:`#fff`},btnDanger:{background:`#ef4444`,color:`#fff`},btnDisabled:{opacity:.5,cursor:`not-allowed`},btnSmall:{padding:`4px 12px`,fontSize:12},status:{marginTop:8,fontSize:12,minHeight:18},card:{display:`flex`,alignItems:`center`,gap:14,padding:`14px 18px`,background:`#f8f9fa`,border:`1px solid #e0e0e0`,borderRadius:10,marginBottom:12},cardIcon:{width:44,height:44,borderRadius:10,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20,fontWeight:700,flexShrink:0},cardInfo:{flex:1},cardTitle:{fontSize:15,fontWeight:600,color:`#333`},cardMeta:{fontSize:12,color:`#888`},stateIndicator:{width:10,height:10,borderRadius:`50%`,flexShrink:0},fieldRow:{display:`flex`,alignItems:`center`,gap:12,marginBottom:10},label:{fontSize:13,fontWeight:500,color:`#555`,width:180,flexShrink:0},select:{padding:`6px 10px`,borderRadius:6,border:`1px solid #ccc`,fontSize:13,background:`#fff`,color:`#333`,minWidth:200},input:{padding:`6px 10px`,borderRadius:6,border:`1px solid #ccc`,fontSize:13,background:`#fff`,color:`#333`,width:200},inputSmall:{padding:`6px 10px`,borderRadius:6,border:`1px solid #ccc`,fontSize:13,background:`#fff`,color:`#333`,width:80},checkbox:{width:16,height:16,accentColor:`#3b82f6`},hint:{fontSize:11,color:`#aaa`,marginLeft:8},link:{color:`#3b82f6`,textDecoration:`none`,fontSize:13,fontWeight:600},textarea:{padding:`6px 10px`,borderRadius:6,border:`1px solid #ccc`,fontSize:13,fontFamily:`monospace`,background:`#fff`,color:`#333`,width:`100%`,minHeight:70,boxSizing:`border-box`,resize:`vertical`},empty:{textAlign:`center`,padding:`30px 16px`,color:`#999`,fontSize:13},tag:{display:`inline-block`,padding:`2px 8px`,borderRadius:4,fontSize:10,fontWeight:600,marginLeft:8},tagPre:{background:`#fef3c7`,color:`#92400e`},tagLatest:{background:`#dcfce7`,color:`#166534`},warnBanner:{padding:`12px 16px`,background:`#fef2f2`,border:`1px solid #fecaca`,borderRadius:10,marginBottom:12,fontSize:13,color:`#991b1b`,lineHeight:1.5},warnBannerTitle:{fontWeight:700,marginBottom:4},infoBanner:{padding:`12px 16px`,background:`#fffbeb`,border:`1px solid #fde68a`,borderRadius:10,marginBottom:12,fontSize:13,color:`#92400e`,lineHeight:1.5},bannerCode:{display:`block`,marginTop:8,padding:`8px 10px`,background:`#fff`,border:`1px solid #fecaca`,borderRadius:6,fontFamily:`monospace`,fontSize:12,color:`#7f1d1d`,whiteSpace:`pre-wrap`,wordBreak:`break-word`},statsGrid:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(140px, 1fr))`,gap:10,marginBottom:12},statCard:{padding:`12px 16px`,background:`#f8f9fa`,border:`1px solid #e0e0e0`,borderRadius:10,textAlign:`center`},statValue:{fontSize:22,fontWeight:700,color:`#333`},statLabel:{fontSize:11,color:`#888`,marginTop:2}},o={ok:`#10b981`,warn:`#f59e0b`,error:`#ef4444`};function s(e,t){if(!e)return{versions:null,versionsError:`⚠ Could not reach GitHub — showing last known versions, retry`};let n=t&&typeof t==`object`?t:{},r=Array.isArray(n)?n:Array.isArray(n.versions)?n.versions:[],i=!Array.isArray(n)&&n.sources&&typeof n.sources==`object`?n.sources:{},a=``;return i.prImages===`rate-limited`?a=`⚠ GitHub rate-limited — PR test images temporarily unavailable, retry shortly`:i.releases===`rate-limited`?a=`⚠ GitHub rate-limited — some versions temporarily unavailable, retry shortly`:(i.prImages===`error`||i.releases===`error`)&&(a=`⚠ Could not fetch some versions from GitHub, retry`),{versions:r,versionsError:a}}function c(e,t={}){let{stableCount:n=5,preCount:r=3}=t,i=e.filter(e=>typeof e.pr==`number`),a=e.filter(e=>typeof e.pr!=`number`);return{prVersions:i,stableVersions:a.filter(e=>!e.prerelease).slice(0,n),preVersions:a.filter(e=>e.prerelease).slice(0,r)}}function l(e,t=[`latest`],n={}){let{prVersions:r,stableVersions:i,preVersions:a}=c(e,n);return new Set([...t,...a.map(e=>e.tag),...i.map(e=>e.tag),...r.map(e=>e.tag)])}function u(e,t,n=[`latest`],r={}){return e?l(t,n,r).has(e)?null:e:null}function d(e){return e==null?`—`:e>=1e6?(e/1e6).toFixed(1)+`M`:e>=1e3?(e/1e3).toFixed(1)+`K`:String(e)}function f(i,a={}){let{intervalMs:o=5e3}=a,[s,c]=e(null),[l,u]=e(!0),d=t(0),f=t(a.fallback??null),p=n(async e=>{let t=++d.current,n=f.current;try{let t=await(await fetch(i,{signal:e})).json().catch(()=>null);t&&typeof t==`object`&&(n=t)}catch{}t===d.current&&(c(n),u(!1))},[i]);return r(()=>{let e=!1,t=null,n=new AbortController,r=async()=>{await p(n.signal),!e&&o>0&&(t=setTimeout(()=>void r(),o))};return r(),()=>{e=!0,n.abort(),t&&clearTimeout(t)}},[p,o]),{status:s,loading:l,refresh:()=>p()}}function p(i){let[a,o]=e([]),[c,l]=e(``),[u,d]=e(!1),f=t(0),p=n(async()=>{let e=++f.current;d(!0);try{let t=await fetch(i),n=await t.json().catch(()=>null),r=s(t.ok,n);if(e!==f.current)return;r.versions!==null&&o(r.versions),l(r.versionsError)}catch{if(e!==f.current)return;l(`⚠ Offline — showing last known versions`)}d(!1)},[i]);return r(()=>{p()},[p]),{versions:a,versionsError:c,loading:u,refresh:p}}function m({children:e,color:t}){return i.createElement(`span`,{style:{...a.hint,...t?{color:t}:{}}},e)}function h({state:e=`ok`,color:t,title:n,style:r}){return i.createElement(`div`,{style:{...a.stateIndicator,background:t??o[e],...r},title:n})}function g({icon:e,iconBackground:t,iconColor:n,title:r,meta:s,state:c=`ok`,stateTitle:l,link:u,children:d}){let f=c===`error`&&!t;return i.createElement(`div`,{style:a.card},i.createElement(`div`,{style:{...a.cardIcon,background:f?`#fef2f2`:t??`#3b82f6`,color:f?o.error:n??`#fff`}},e),i.createElement(`div`,{style:a.cardInfo},i.createElement(`div`,{style:a.cardTitle},r),s!=null&&i.createElement(`div`,{style:a.cardMeta},s)),d,u&&i.createElement(`a`,{href:u.href,target:`_blank`,rel:`noopener noreferrer`,style:a.link},u.label),i.createElement(h,{state:c,title:l}))}function _({title:t,defaultOpen:n=!1,children:r}){let[o,s]=e(n);return i.createElement(`div`,null,i.createElement(`button`,{type:`button`,"aria-expanded":o,style:{...a.sectionTitle,...a.sectionToggle},onClick:()=>s(!o)},i.createElement(`span`,{style:{...a.sectionMarker,transform:o?`rotate(90deg)`:`rotate(0deg)`}},`▶`),t),o&&i.createElement(`div`,{style:{marginBottom:16}},r))}var v={primary:a.btnPrimary,secondary:a.btnSecondary,warn:a.btnWarn,danger:a.btnDanger};function y({variant:e=`primary`,small:t=!1,busy:n=!1,busyLabel:r,disabled:o=!1,onClick:s,title:c,style:l,children:u}){let d=o||n;return i.createElement(`button`,{type:`button`,style:{...a.btn,...v[e],...t?a.btnSmall:{},...d?a.btnDisabled:{},...l},onClick:s,disabled:d,title:c},n?r??u:u)}function ee({message:e,error:t=!1,style:n}){return e?i.createElement(`div`,{style:{...a.status,color:t?o.error:o.ok,marginTop:16,...n}},e):null}var b=[{tag:`latest`,label:`latest (recommended)`}];function te({value:e,onChange:t,versions:n,floatingOptions:r=b,stableCount:s,preCount:l,loading:d=!1,error:f,onRefresh:p,disabled:h=!1,style:g}){let _={stableCount:s,preCount:l},{prVersions:v,stableVersions:ee,preVersions:te}=c(n,_),x=u(e,n,r.map(e=>e.tag),_);return i.createElement(i.Fragment,null,i.createElement(`select`,{style:{...a.select,...g},value:e,onChange:e=>t(e.target.value),disabled:h},r.map(e=>i.createElement(`option`,{key:e.tag,value:e.tag},e.label??e.tag)),te.map(e=>i.createElement(`option`,{key:e.tag,value:e.tag},e.tag,` (pre-release)`)),ee.map((e,t)=>i.createElement(`option`,{key:e.tag,value:e.tag},e.tag,t===0?` (current stable)`:``)),v.length>0&&i.createElement(`optgroup`,{label:`PR test images`},v.map(e=>i.createElement(`option`,{key:e.tag,value:e.tag},e.tag,e.title?` — ${e.title}`:``))),x&&i.createElement(`option`,{value:x},x,` (running)`)),d&&i.createElement(m,null,`loading releases...`),p&&i.createElement(y,{small:!0,style:{padding:`4px 10px`,fontSize:11},onClick:p,title:`Refresh available versions`},`↻`),f&&i.createElement(m,{color:o.error},f))}var x={...a,warnBannerCode:{display:`block`,marginTop:8,padding:`8px 10px`,background:`#fff`,border:`1px solid #fecaca`,borderRadius:6,fontFamily:`monospace`,fontSize:12,color:`#7f1d1d`,whiteSpace:`pre-wrap`,wordBreak:`break-word`},fieldHelp:{fontSize:12,color:`#666`,marginTop:6,lineHeight:1.5},migrationItem:{display:`flex`,alignItems:`center`,gap:12,padding:`12px 16px`,background:`#f8f9fa`,border:`1px solid #e0e0e0`,borderRadius:10,marginBottom:8},migrationActions:{display:`flex`,gap:8,alignItems:`center`}},S=e=>typeof e==`object`&&!!e;function ne(e){let t=S(e)?e.sources:void 0;return Array.isArray(t)?t.filter(e=>S(e)&&typeof e.type==`string`&&typeof e.url==`string`&&typeof e.status==`string`&&(e.version===void 0||typeof e.version==`string`)):[]}function C(e){return e instanceof Error?e.message:String(e)}function w(e,t){return e??t}var T=[`none`,`lz4`,`zstd`],re={padding:`4px 12px`,fontSize:12};function ie(e){return T.includes(e)?e:`lz4`}function E({configuration:a,save:o}){let s=a||{},[c,l]=e(s.questdbHost||`127.0.0.1`),[u,m]=e(s.questdbIlpPort||9009),[h,v]=e(s.questdbHttpPort||9e3),[b,S]=e(s.questdbPgPort||8812),[T,E]=e(s.questdbVersion||`latest`),[D,ae]=e(s.managedContainer!==!1),[oe,se]=e(s.recordSelf!==!1),[ce,le]=e(s.recordOthers!==!1),[O,ue]=e(s.restoreOnStart===!0),[de,fe]=e(s.enableConsole!==!1),[pe,me]=e((s.restoreMaxAgeMinutes??0)>0?s.restoreMaxAgeMinutes:9),[he,ge]=e(s.defaultSamplingRate??2e3),[k,_e]=e(String(s.ilpFlushIntervalMs??5e3)),[ve,ye]=e(s.retentionDays||0),[A,be]=e(s.pathFilter?.mode===`include`?`include`:`exclude`),[j,xe]=e((Array.isArray(s.pathFilter?.paths)?s.pathFilter.paths:[]).join(`
2
- `)),[Se,Ce]=e(s.compression||`lz4`),[we,Te]=e(s.compressionLevel||3),[Ee,De]=e(s.networkName||`sk-network`),[M,Oe]=e(s.exposeToContainers||!1),{versions:ke,versionsError:Ae,loading:je,refresh:Me}=p(`/plugins/signalk-questdb/api/versions`),{status:N,loading:Ne,refresh:P}=f(`/plugins/signalk-questdb/api/status`,{fallback:{status:`not_running`},intervalMs:5e3}),[F,Pe]=e(null),[Fe,Ie]=e(!1),[I,Le]=e(``),[Re,L]=e(``),[ze,R]=e(!1),[z,Be]=e(null),[Ve,He]=e(!1),[Ue,We]=e(!1),[Ge,Ke]=e(!1),[qe,Je]=e(!1),[Ye,B]=e(``),[V,Xe]=e(null),[H,U]=e(!1),W=t(0),[Ze,Qe]=e(!1),G=n(async e=>{let t=++W.current;try{let n=await fetch(`/plugins/signalk-questdb/api/wal-diagnosis`,{signal:e});if(t!==W.current)return;if(n.ok){let e=await n.json();if(t!==W.current)return;Xe(e),U(!1)}else U(!0)}catch{t===W.current&&U(!0)}},[]),$e=!!(N&&N.status===`running`&&(N.suspendedTables||[]).length>0);r(()=>{if(!$e){Xe(null),U(!1);return}let e=!1,t=null,n=new AbortController,r=async()=>{await G(n.signal),e||(t=setTimeout(r,15e3))};return r(),()=>{e=!0,n.abort(),t&&clearTimeout(t)}},[$e,G]);let et=async(e,t)=>{let n=t.tailSkip?`
3
-
4
- WARNING: this is the newest pending segment — skipping it drops the ENTIRE pending backlog.`:``;if(window.confirm(`Skip the unreadable WAL segment on ${e}?\n\nThis permanently loses ${d(t.skippedTxns)} transaction(s) recorded between ${t.skipWindowStart} and ${t.skipWindowEnd}. Everything after the skipped segment is replayed without loss.`+n)){Qe(!0),B(``);try{let n=await fetch(`/plugins/signalk-questdb/api/resume-wal/skip`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({table:e,confirmPlan:t})}),r=await n.json().catch(()=>({error:n.statusText}));n.ok?B(r.message??``):B(`Skip failed: ${w(r.error,`unknown error`)}`),P(),G()}catch(e){B(`Skip failed: ${C(e)}`)}Qe(!1)}},tt=async()=>{He(!0);try{let e=await fetch(`/plugins/signalk-questdb/api/update/check`);e.ok&&Be(await e.json())}catch{}He(!1)},nt=async()=>{We(!0),L(`Pulling new image and restarting...`),R(!1);try{let e=await fetch(`/plugins/signalk-questdb/api/update/apply`,{method:`POST`});if(e.ok){let t=await e.json();L(t.message??``),Be(null),t.newVersion&&E(t.newVersion),P()}else{let t=await e.json().catch(()=>({error:e.statusText}));L(`Update failed: ${w(t.error,`unknown error`)}`),R(!0)}}catch(e){L(`Update failed: ${C(e)}`),R(!0)}We(!1)},rt=async()=>{if(window.confirm(`Remove the QuestDB container and DELETE ALL recorded data? This cannot be undone.`)){Ke(!0),L(`Removing QuestDB container and data...`),R(!1);try{let e=await fetch(`/plugins/signalk-questdb/api/purge-data`,{method:`POST`}),t=await e.json().catch(()=>({error:e.statusText}));e.ok?(L(t.message??``),P()):(L(`Remove failed: ${w(t.error,`unknown error`)}`),R(!0))}catch(e){L(`Remove failed: ${C(e)}`),R(!0)}Ke(!1)}},it=async()=>{Je(!0),B(``);try{let e=await fetch(`/plugins/signalk-questdb/api/resume-wal`,{method:`POST`}),t=await e.json().catch(()=>({error:e.statusText}));if(e.ok){let e=(t.results||[]).filter(e=>!e.ok);B(e.length===0?`${w(t.message,`Resume requested`)}. Recording resumes as the backlog drains — the banner clears once tables catch up.`:`${w(t.message,`Resume requested`)}. `+e.map(e=>`${e.table}: ${e.error}`).join(` · `)),P(),G()}else B(`Resume failed: ${w(t.error,`unknown error`)}`)}catch(e){B(`Resume failed: ${C(e)}`)}Je(!1)},at=async()=>{Ie(!0),L(``);try{let e=I?`?url=${encodeURIComponent(I)}`:``,t=await fetch(`/plugins/signalk-questdb/api/migration/detect${e}`);if(t.ok){let e=ne(await t.json().catch(()=>null));Pe(e),e.length===0&&(L(I?`No InfluxDB found at ${I}.`:`No InfluxDB instances detected on localhost:8086.`),R(!1))}}catch(e){L(`Detection failed: `+C(e)),R(!0)}Ie(!1)},[K,ot]=e(``),[q,st]=e(``),[J,ct]=e(`parquet`),[lt,ut]=e(!1),dt=()=>{let e=Number(k);if(k===``||!Number.isFinite(e)||e<500||e>3e5){L(`Write batch interval must be 500–300000 ms.`),R(!0);return}o({...s,questdbHost:c,questdbIlpPort:u,questdbHttpPort:h,questdbPgPort:b,questdbVersion:T,managedContainer:D,defaultSamplingRate:he,ilpFlushIntervalMs:e,recordSelf:oe,recordOthers:ce,restoreOnStart:O,enableConsole:de,restoreMaxAgeMinutes:pe,retentionDays:ve,compression:Se,compressionLevel:we,networkName:Ee,exposeToContainers:M,pathFilter:{mode:A,paths:j.split(`
5
- `).map(e=>e.trim()).filter(Boolean)},samplingRates:s.samplingRates||{}}),L(`Saved! Plugin will restart with new configuration.`),R(!1)},ft=async()=>{if(!K||!q){L(`Set both from and to dates for export.`),R(!0);return}ut(!0),L(`Exporting ${J.toUpperCase()}...`),R(!1);try{let e=`/plugins/signalk-questdb/api/export?from=${encodeURIComponent(K)}&to=${encodeURIComponent(q)}&format=${J}`,t=await fetch(e);if(!t.ok){let e=await t.json().catch(()=>({error:t.statusText}));L(`Export failed: ${w(e.error,`unknown error`)}`),R(!0),ut(!1);return}let n=await t.blob(),r=J===`parquet`?`parquet`:`csv`,i=document.createElement(`a`);i.href=URL.createObjectURL(n),i.download=`signalk-export-${K.slice(0,10)}.${r}`,i.click(),URL.revokeObjectURL(i.href),L(`Exported ${(n.size/1024/1024).toFixed(1)} MB`)}catch(e){L(`Export failed: ${C(e)}`),R(!0)}ut(!1)},Y=N&&N.status===`running`,X=Y&&N.suspendedTables||[],Z=X.length>0,pt=Y&&N.schemaMismatch||!1,Q=Y&&N.ulimitClamp||null,mt=Q!==null&&Q.granted<=0,$=N?.hostMaxMapCount?.tooLow&&N.hostMaxMapCount||null;return i.createElement(`div`,{style:x.root},i.createElement(`div`,{style:x.sectionTitle},`QuestDB Status`),$&&i.createElement(`div`,{style:x.infoBanner},i.createElement(`div`,{style:x.warnBannerTitle},`Host vm.max_map_count is low — `,d($.current),` `,`(QuestDB recommends `,d($.recommended),`)`),`QuestDB memory-maps every partition and WAL segment it touches. As the database grows, this kernel limit can run out — mmap then fails with out-of-memory errors even though RAM is free, which shows up as slow or failing history queries, can suspend recording, and can take QuestDB down entirely. Run this in a shell on the host machine — not inside the QuestDB container, which can neither change the kernel-global limit nor has sudo (takes effect immediately, no restart needed):`,i.createElement(`code`,{style:x.warnBannerCode},`echo 'vm.max_map_count=${$.recommended}' | sudo tee /etc/sysctl.d/99-questdb.conf && sudo sysctl --system`)),Ne?i.createElement(`div`,{style:x.empty},`Checking QuestDB...`):Y?i.createElement(i.Fragment,null,Z&&i.createElement(`div`,{style:x.warnBanner},i.createElement(`div`,{style:x.warnBannerTitle},`QuestDB WAL suspended — recording stalled`),`Rows are arriving but no longer commit, so the counts below have stopped advancing. This follows an error while QuestDB applied the write-ahead log — see the reason reported per table below. Resuming replays every pending transaction, so no data is lost.`,i.createElement(`code`,{style:x.warnBannerCode},X.map(e=>{let t=String(e.errorMessage||e.errorTag||`reason not reported`).replace(/[\r\n]+/g,` `),n=(V?.tables||[]).find(t=>t.name===e.name),r=n?.suspendedSince?` — frozen since ${n.suspendedSince}`:``;return`${e.name}: ${d(e.txnLag)} txns behind — ${t}${r}`}).join(`
6
- `)),(V?.tables||[]).filter(e=>e.applyError).map(e=>i.createElement(`div`,{key:e.name,style:{marginTop:8,fontSize:12}},`QuestDB's own log reports the apply failure on`,` `,i.createElement(`code`,null,e.name),` as:`,i.createElement(`code`,{style:x.warnBannerCode},e.applyError))),i.createElement(`div`,{style:{marginTop:10}},i.createElement(y,{variant:`primary`,busy:qe,busyLabel:`Resuming...`,disabled:Ze,onClick:it},`Resume recording`)),X.filter(e=>e.autoResume===`failed`).map(e=>{let t=(V?.tables||[]).find(t=>t.name===e.name);if(t?.partitionOpenFailure)return i.createElement(`div`,{key:e.name,style:{marginTop:12}},i.createElement(`div`,{style:x.warnBannerTitle},e.name,`: table data damaged — automatic repair not possible`),`QuestDB fails while opening this table's stored data, before it reaches any pending transaction. That means the commit record on disk describes rows whose data never made it to storage — the signature of a power loss during a write. Skipping transactions cannot fix this (the failure happens before them) and would discard the `,d(e.txnLag),` pending transactions for nothing, so no repair button is offered. Recovering this table means repairing its commit record by hand; please open an issue with the error above. Recording continues into the other tables, and “Resume recording” will re-suspend this one within milliseconds — it is safe to press, but it cannot repair this damage.`);let n=t?.skipPlan;return n?i.createElement(`div`,{key:e.name,style:{marginTop:12}},i.createElement(`div`,{style:x.warnBannerTitle},e.name,`: automatic resume failed — WAL segment unreadable`),`A lossless resume was attempted and the table re-suspended at the same transaction: the write-ahead-log segment at the stall point cannot be read back (typically corrupted by an unclean shutdown mid-write). Replaying can never get past it. The only repair is to skip the unreadable segment, losing`,` `,i.createElement(`b`,null,d(n.skippedTxns),` transaction(s)`),` `,`recorded between `,i.createElement(`b`,null,n.skipWindowStart),` and`,` `,i.createElement(`b`,null,n.skipWindowEnd),n.tailSkip?` — and this is the newest pending segment, so skipping it drops the ENTIRE pending backlog`:` — everything after the skipped segment (${d(Math.max(0,e.txnLag-n.skippedTxns))} txns) is replayed without loss`,`.`,i.createElement(`div`,{style:{marginTop:8}},i.createElement(y,{variant:`danger`,busy:Ze,busyLabel:`Skipping...`,disabled:qe||H,onClick:()=>et(e.name,n)},`Skip unreadable segment (loses data)`),H&&i.createElement(`div`,{style:{marginTop:6,fontSize:12}},`The diagnosis could not be refreshed — the numbers above may be stale. The skip re-enables once a refresh succeeds.`))):null}),i.createElement(`div`,{style:{marginTop:8,fontSize:12}},`Manual fallback in the QuestDB SQL console (`,i.createElement(`code`,null,`:9000`),`), one statement at a time — avoid running it from several tabs, the console retries a busy statement forever:`,i.createElement(`code`,{style:x.warnBannerCode},X.map(e=>{let t=`"${String(e.name).replace(/"/g,`""`)}"`,n=(V?.tables||[]).find(t=>t.name===e.name),r=[`ALTER TABLE ${t} RESUME WAL;`];return e.autoResume===`failed`&&n?.skipPlan&&!H&&r.push(`-- if the resume re-suspends: skip the unreadable segment (loses ${d(n.skipPlan.skippedTxns)} txns)`,`ALTER TABLE ${t} RESUME WAL FROM TXN ${n.skipPlan.skipToTxn};`),r.join(`
7
- `)}).join(`
8
- `)))),Ye&&i.createElement(`div`,{style:x.infoBanner},Ye),pt&&i.createElement(`div`,{style:x.warnBanner},i.createElement(`div`,{style:x.warnBannerTitle},`QuestDB table schema mismatch — data not readable`),`A QuestDB table was re-created by ILP ingestion with the wrong timestamp column, so rows are being stored but reads filtering on time (history, Grafana, and the counts above) return nothing. The plugin rebuilds the affected table with the correct schema automatically within a minute; if this persists, restart the plugin. (The few rows written into the wrong-schema table are lost — they were unreadable anyway.)`),Q&&i.createElement(`div`,{style:x.infoBanner},i.createElement(`div`,{style:x.warnBannerTitle},mt?`QuestDB open-files request rejected by the host`:`QuestDB open-files limit capped by the host`),mt?i.createElement(i.Fragment,null,`QuestDB requested a `,i.createElement(`code`,null,Q.ulimit),` limit of`,` `,d(Q.requested),`, but the container host rejected it, so QuestDB is running with the runtime's default limits. This is typical for podman machine on macOS, where the limits live inside the VM and cannot be read from here. Raise the limits of the service that runs the container runtime (on macOS: inside the VM, via`,` `,i.createElement(`code`,null,`podman machine ssh`),`), then remove the container once with `,i.createElement(`code`,null,`podman rm -f sk-signalk-questdb`),` and restart Signal K — a restart alone cannot re-grant a rejected ask.`):i.createElement(i.Fragment,null,`QuestDB requested a `,i.createElement(`code`,null,Q.ulimit),` limit of`,` `,d(Q.requested),`, but this host only allows `,d(Q.granted),`, so it was capped. QuestDB is running on the lower limit. To grant the full value, raise the host limit for the user running the container runtime — under rootless Podman that means a systemd`,` `,i.createElement(`code`,null,`user@.service`),` `,i.createElement(`code`,null,`LimitNOFILE`),` drop-in (editing `,i.createElement(`code`,null,`/etc/security/limits.conf`),` alone is usually not enough) — then restart the Signal K server so the plugin can re-create the QuestDB container with the raised limit (signalk-container 1.25.3+; on older versions remove the container once with`,` `,i.createElement(`code`,null,`podman rm -f sk-signalk-questdb`),` instead).`),` `,`This warning clears itself once the container is running with the full value.`,` `,i.createElement(`a`,{href:mt?`https://github.com/dirkwa/signalk-questdb#questdb-container-never-starts-on-macos-podman-machine`:`https://github.com/dirkwa/signalk-container#raising-the-open-files-limit-nofile`,target:`_blank`,rel:`noreferrer`,style:{color:`#92400e`,textDecoration:`underline`}},`Step-by-step instructions`),`.`),i.createElement(g,{icon:`Q`,iconBackground:`#7c3aed`,iconColor:`#fff`,title:`QuestDB`,meta:i.createElement(i.Fragment,null,N?.endpoint||`${c}:${h}`,` `,`· `,Z?`WAL suspended`:`Recording`),state:Z?`error`:`ok`,stateTitle:Z?`WAL suspended`:`Running`}),i.createElement(`div`,{style:x.statsGrid},i.createElement(`div`,{style:x.statCard},i.createElement(`div`,{style:x.statValue},d(N.totalRows)),i.createElement(`div`,{style:x.statLabel},`Total Rows`)),i.createElement(`div`,{style:x.statCard},i.createElement(`div`,{style:x.statValue},d(N.activePathsToday)),i.createElement(`div`,{style:x.statLabel},`Active Paths Today`)),N.restore&&i.createElement(`div`,{style:x.statCard},i.createElement(`div`,{style:x.statValue},N.restore.failed?`—`:d(N.restore.contexts)),i.createElement(`div`,{style:x.statLabel},N.restore.failed?`Restore failed`:`Vessels Restored`))),i.createElement(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,marginBottom:12}},z&&z.updateAvailable?i.createElement(i.Fragment,null,i.createElement(`span`,{style:{fontSize:13}},`v`,z.currentVersion,` →`,` `,i.createElement(`strong`,null,`v`,z.latestVersion),` available`),i.createElement(y,{variant:`primary`,busy:Ue,busyLabel:`Updating...`,onClick:nt,style:re},`Update QuestDB`)):z&&!z.updateAvailable?i.createElement(`span`,{style:{fontSize:12,color:`#888`}},`v`,z.currentVersion,` (up to date)`):i.createElement(y,{variant:`secondary`,busy:Ve,busyLabel:`Checking...`,onClick:tt,style:re},`Check for updates`))):i.createElement(g,{icon:`Q`,title:`QuestDB`,meta:i.createElement(i.Fragment,null,N?.status===`unhealthy`?`Not responding`:`Not running`,D?` — enable plugin to start container`:``),state:`error`}),i.createElement(`div`,{style:x.sectionTitle},`Image Version`),i.createElement(`div`,{style:x.fieldRow},i.createElement(`span`,{style:x.label},`QuestDB version`),i.createElement(te,{value:T,onChange:E,versions:ke,loading:je,onRefresh:()=>void Me(),error:Ae,stableCount:3,preCount:2})),i.createElement(`div`,{style:x.sectionTitle},`Connection`),i.createElement(`div`,{style:x.fieldRow},i.createElement(`span`,{style:x.label},`Managed container`),i.createElement(`input`,{type:`checkbox`,style:x.checkbox,checked:D,onChange:e=>ae(e.target.checked)}),i.createElement(`span`,{style:x.hint},D?`signalk-container manages QuestDB`:`Connect to external QuestDB`)),!D&&i.createElement(i.Fragment,null,i.createElement(`div`,{style:x.fieldRow},i.createElement(`span`,{style:x.label},`QuestDB host`),i.createElement(`input`,{style:x.input,value:c,onChange:e=>l(e.target.value)})),i.createElement(`div`,{style:x.fieldRow},i.createElement(`span`,{style:x.label},`HTTP port (queries)`),i.createElement(`input`,{style:x.inputSmall,type:`number`,value:h,onChange:e=>v(Number(e.target.value))})),i.createElement(`div`,{style:x.fieldRow},i.createElement(`span`,{style:x.label},`ILP port (writes)`),i.createElement(`input`,{style:x.inputSmall,type:`number`,value:u,onChange:e=>m(Number(e.target.value))}))),D&&i.createElement(`div`,{style:x.fieldRow},i.createElement(`span`,{style:x.label},`Bind to 0.0.0.0`),i.createElement(`input`,{type:`checkbox`,style:x.checkbox,checked:M,onChange:e=>Oe(e.target.checked)}),i.createElement(`span`,{style:{...x.hint,color:M?`#ef4444`:void 0}},M?`Caution! This exposes your data to the network`:`Signal K reaches QuestDB automatically — only enable to reach it from another machine or a separate-Docker Grafana`)),D&&M&&i.createElement(i.Fragment,null,i.createElement(`div`,{style:x.fieldRow},i.createElement(`span`,{style:x.label},`HTTP port (queries)`),i.createElement(`input`,{style:x.inputSmall,type:`number`,value:h,onChange:e=>v(Number(e.target.value))})),i.createElement(`div`,{style:x.fieldRow},i.createElement(`span`,{style:x.label},`ILP port (writes)`),i.createElement(`input`,{style:x.inputSmall,type:`number`,value:u,onChange:e=>m(Number(e.target.value))})),i.createElement(`div`,{style:x.fieldRow},i.createElement(`span`,{style:x.label},`PostgreSQL wire port`),i.createElement(`input`,{style:x.inputSmall,type:`number`,value:b,onChange:e=>S(Number(e.target.value))}),i.createElement(`span`,{style:x.hint},`for Grafana`)),i.createElement(`div`,{style:x.fieldRow},i.createElement(`span`,{style:x.label},`Container network`),i.createElement(`input`,{style:x.input,value:Ee,onChange:e=>De(e.target.value)}),i.createElement(`span`,{style:x.hint},`shared with signalk-grafana`))),i.createElement(`div`,{style:x.sectionTitle},`Recording`),i.createElement(`div`,{style:x.fieldRow},i.createElement(`span`,{style:x.label},`Default sampling rate (ms)`),i.createElement(`input`,{style:x.inputSmall,type:`number`,value:he,onChange:e=>ge(Number(e.target.value))}),i.createElement(`span`,{style:x.hint},`1000 = max 1 write/sec per path (0 = every update)`)),i.createElement(`div`,{style:x.fieldRow},i.createElement(`span`,{style:x.label},`Write batch interval (ms)`),i.createElement(`input`,{style:x.inputSmall,type:`number`,min:500,max:3e5,"aria-label":`Write batch interval in milliseconds`,value:k,onChange:e=>_e(e.target.value)}),i.createElement(`span`,{style:x.hint},`one QuestDB transaction per table per interval; longer = bigger batches, but up to this many ms lost on a hard crash (default 5000)`)),i.createElement(`div`,{style:x.fieldRow},i.createElement(`span`,{style:x.label},`Record own vessel`),i.createElement(`input`,{type:`checkbox`,style:x.checkbox,checked:oe,onChange:e=>se(e.target.checked)})),i.createElement(`div`,{style:x.fieldRow},i.createElement(`span`,{style:x.label},`Record AIS targets`),i.createElement(`input`,{type:`checkbox`,style:x.checkbox,checked:ce,onChange:e=>le(e.target.checked)})),i.createElement(`div`,{style:x.fieldRow},i.createElement(`span`,{style:x.label},`Restore vessels on startup`),i.createElement(`input`,{type:`checkbox`,style:x.checkbox,"aria-label":`Restore vessels on startup`,checked:O,onChange:e=>ue(e.target.checked)}),i.createElement(`span`,{style:x.hint},`replay each vessel's last recorded position after a restart, so AIS targets appear at once instead of only when they next transmit`)),i.createElement(`div`,{style:x.fieldRow},i.createElement(`span`,{style:x.label},`QuestDB console webapp`),i.createElement(`input`,{type:`checkbox`,style:x.checkbox,"aria-label":`QuestDB console webapp`,checked:de,onChange:e=>fe(e.target.checked)}),i.createElement(`span`,{style:x.hint},`serve QuestDB's own console inside the Signal K admin UI (admin only). It is a full SQL client — unlike the read-only query endpoint it can modify and delete recorded data`)),O&&i.createElement(`div`,{style:x.fieldRow},i.createElement(`span`,{style:x.label},`Restore max age (minutes)`),i.createElement(`input`,{style:x.inputSmall,type:`number`,min:1,"aria-label":`Restore max age (minutes)`,value:pe,onChange:e=>{let t=Number(e.target.value);Number.isFinite(t)&&t>=1&&me(t)}}),i.createElement(`span`,{style:x.hint},`only replay values this recent (default 9, matching Freeboard's AIS expiry); higher puts staler positions on the chart`)),i.createElement(`div`,{style:x.fieldRow},i.createElement(`span`,{style:x.label},`Retention (days)`),i.createElement(`input`,{style:x.inputSmall,type:`number`,value:ve,onChange:e=>ye(Number(e.target.value))}),i.createElement(`span`,{style:x.hint},`0 = keep forever`)),i.createElement(_,{title:`Path filtering`,defaultOpen:j.trim()!==``},i.createElement(`div`,{style:x.fieldRow},i.createElement(`span`,{style:x.label},`Filter mode`),i.createElement(`select`,{style:x.select,value:A,onChange:e=>be(e.target.value===`include`?`include`:`exclude`)},i.createElement(`option`,{value:`exclude`},`Exclude matching paths`),i.createElement(`option`,{value:`include`},`Include only matching paths`))),i.createElement(`div`,{style:{marginBottom:10}},i.createElement(`div`,{style:{...x.label,width:`auto`,marginBottom:6}},`Path patterns (one per line, glob supported) — optional`),i.createElement(`textarea`,{style:x.textarea,value:j,onChange:e=>xe(e.target.value),placeholder:`notifications.*
9
- environment.wind.*`}),i.createElement(`div`,{style:x.fieldHelp},`Empty = record everything (the default). Nothing is filtered out unless you list a pattern here.`),i.createElement(`div`,{style:{...x.hint,marginLeft:0}},A===`exclude`?`These paths are NOT recorded; everything else is.`:`ONLY these paths are recorded; everything else is dropped.`))),i.createElement(_,{title:`Compression (on-disk)`},i.createElement(`div`,{style:x.fieldRow},i.createElement(`span`,{style:x.label},`Compression codec`),i.createElement(`select`,{style:x.select,value:Se,onChange:e=>Ce(ie(e.target.value))},i.createElement(`option`,{value:`none`},`None`),i.createElement(`option`,{value:`lz4`},`LZ4 (fast)`),i.createElement(`option`,{value:`zstd`},`ZSTD (smaller)`)),i.createElement(`span`,{style:x.hint},`applies to new data after save`)),Se===`zstd`&&i.createElement(`div`,{style:x.fieldRow},i.createElement(`span`,{style:x.label},`ZSTD level`),i.createElement(`input`,{style:x.inputSmall,type:`number`,min:`1`,max:`22`,value:we,onChange:e=>Te(Number(e.target.value))}),i.createElement(`span`,{style:x.hint},`1 (fast) to 22 (smallest)`))),i.createElement(_,{title:`InfluxDB Migration`},i.createElement(`div`,{style:{display:`flex`,gap:10,alignItems:`center`,marginBottom:10}},i.createElement(y,{variant:`primary`,busy:Fe,busyLabel:`Detecting...`,onClick:at},`Detect InfluxDB`),i.createElement(`span`,{style:x.hint},`Checks localhost:8086 for InfluxDB 1.x and 2.x`)),F&&F.length>0&&i.createElement(`div`,null,F.map((e,t)=>i.createElement(`div`,{key:t,style:x.migrationItem},i.createElement(`div`,{style:{...x.cardIcon,width:36,height:36,fontSize:16,background:e.type===`influxdb2`?`#020a47`:`#22adf6`,color:`#fff`}},e.type===`influxdb2`?`2`:`1`),i.createElement(`div`,{style:x.cardInfo},i.createElement(`div`,{style:x.cardTitle},`InfluxDB `,e.type===`influxdb2`?`2.x`:`1.x`,i.createElement(`span`,{style:{...x.tag,...x.tagLatest}},e.status)),i.createElement(`div`,{style:x.cardMeta},e.url,` · v`,e.version))))),i.createElement(`div`,{style:{...x.fieldRow,marginTop:10}},i.createElement(`span`,{style:x.label},`Manual InfluxDB URL`),i.createElement(`input`,{style:x.input,placeholder:`http://192.168.1.100:8086`,value:I,onChange:e=>Le(e.target.value)}),i.createElement(`span`,{style:x.hint},`for remote instances`)),F&&F.length===0&&!Fe&&i.createElement(`div`,{style:{...x.empty,padding:`16px`,textAlign:`left`}},`No InfluxDB found on localhost. Use manual URL above for remote instances.`)),i.createElement(_,{title:`Data Export`},i.createElement(`div`,{style:x.fieldRow},i.createElement(`span`,{style:x.label},`From`),i.createElement(`input`,{style:x.input,type:`datetime-local`,value:K,onChange:e=>ot(e.target.value)})),i.createElement(`div`,{style:x.fieldRow},i.createElement(`span`,{style:x.label},`To`),i.createElement(`input`,{style:x.input,type:`datetime-local`,value:q,onChange:e=>st(e.target.value)})),i.createElement(`div`,{style:x.fieldRow},i.createElement(`span`,{style:x.label},`Format`),i.createElement(`select`,{style:x.select,value:J,onChange:e=>ct(e.target.value)},i.createElement(`option`,{value:`parquet`},`Parquet`),i.createElement(`option`,{value:`csv`},`CSV`))),i.createElement(y,{variant:`primary`,busy:lt,busyLabel:`Exporting...`,onClick:ft},`Export Data`)),s.managedContainer!==!1&&i.createElement(_,{title:`Danger zone`},i.createElement(`div`,{style:{fontSize:13,color:`#555`,marginBottom:10}},`Remove the QuestDB container and permanently delete all recorded data. Use this to fully reset QuestDB — Signal K's plugin-uninstall cannot delete this data on rootless Podman. This cannot be undone.`),i.createElement(y,{variant:`danger`,busy:Ge,busyLabel:`Removing...`,onClick:rt},`Remove container & all data`)),i.createElement(ee,{message:Re,error:ze,style:{marginTop:16}}),i.createElement(`div`,{style:{marginTop:24}},i.createElement(y,{onClick:dt},`Save Configuration`)))}export{E as default};