Skip to content

Adopt di.torq.proc.wdb 0.3.0 - #3

Merged
DI-Dexter merged 2 commits into
mainfrom
wdb-0.3.0
Oct 15, 2026
Merged

DI-Dexter merged 2 commits into
mainfrom
wdb-0.3.0

Conversation

@DI-Dexter

@DI-Dexter DI-Dexter commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Picks up the rewritten wdb merged in kdbx-modules #137 (di.torq.proc.wdb 0.2.0 → 0.3.0).

Changes

deps.toml — bump the wdb pin and add di.merge, a new hard dependency of 0.3.0 (di.os is also new but has no VERSION file, so depcheck does not take it).

appconfig/settings/wdb1.toml — add a [numtab] section.

That second one is not cosmetic. 0.3.0 restores legacy TorQ's `quote`trade!10000 50000 default for numtab (0.2.0 defaulted it to an empty dict), and maxrows prefers numtab over numrows:

maxrows:{[t] $[t in key .z.m.numtab;.z.m.numtab t;.z.m.numrows]}

So the existing numrows = 500 was left governing only packets, which the feed never publishes. The two tables carrying all the data were overridden to 10,000 and 50,000 — at the feed's rate trade needs roughly 85 minutes to flush, so nothing was written intraday. Observed before the fix: wdbsave had fired 80 times with trade at 1059 and quote at 4067 rows and an empty working partition. No data would have been lost (endofdaysave passes forcesave = 1b), but the intraday writedown — the reason to run a wdb rather than just an rdb — did not happen, and up to 50,000 trade rows would sit in RAM.

replaynumtab defaults to numtab, so log replay was affected the same way; it inherits this fix.

This is documented behaviour (wdb.md lines 226-239), not a surprise in the module.

No other settings change was needed

Every other new 0.3.0 key is defaulted and the defaults suit this stack: mode = saveandsort sorts in-process so there is no sort/sortworker process to add, partitiontype = date, and hdbtypes/rdbtypes/idbtypes default to proctypes already in process.csv. idb1 needs no settings — it reads .wdb.savedir/.wdb.hdbdir/.wdb.currentpartition/.wdb.writedownmode from the wdb at root. rdb1.toml already sets reloadenabled = true, which 0.3.0 still requires when a wdb is present.

Verification

Run against kdbx-modules main (644bd91, wdb 0.3.0), full stack:

discovery1 tickerplant1 chainedtp1 hdb feed1 rdb1 wdb1 gateway1 idb1 housekeeping1

All ten report result`procname, so di.torq.init returned rather than aborting — torqx.sh status cannot tell the difference, since a process whose init throws stays up. loader1 exits after its run hook, as designed.

wdb behaviour with this PR's config:

[wdb] initialised, mode=saveandsort, writedownmode=default, flush every 5s
[depcheck] dependency check complete: 0 failure(s), 0 warning(s)
[rowcheck] the quote table consists of 556 rows
[save] saving quote data to partition 2026.10.14
[rowcheck] the quote table consists of 543 rows
[save] saving quote data to partition 2026.10.14

Rows land in wdb/<date>/quote enumerated against the HDB sym file. All 23 deps.toml pins resolve against main.

One unrelated doc nit found along the way

wdb.md:239 suggests numtab = {} to restore 0.2.0 behaviour, but di.util.toml supports [section] nesting and not inline tables, so it signals di.util.toml: unparseable value ... {}. An empty [numtab] section does work and yields ()!(). This PR sets explicit 500/500 thresholds instead, so the demo's flush pace does not silently track numrows. Worth a one-line fix in kdbx-modules.

🤖 Generated with Claude Code

DI-Dexter and others added 2 commits October 14, 2026 10:43
#137 rewrote di.torq.proc.wdb (0.2.0 -> 0.3.0): all four legacy writedown
modes, the end-of-day merge, and proctypes sort/sortworker served by the same
module. It added di.merge as a hard dependency, so the app manifest needs it
for depcheck to validate the subtree.

No settings change is needed. Every new 0.3.0 key is defaulted, and the
defaults suit this stack: mode=saveandsort sorts in-process (no sort process
to add), partitiontype=date, and hdbtypes/rdbtypes/idbtypes default to the
proctypes already in process.csv. wdb1.toml's existing four settings remain
valid.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
di.torq.proc.wdb 0.3.0 restores legacy TorQ's `quote`trade!10000 50000 default
for numtab (0.2.0 defaulted it to an empty dict), and maxrows prefers numtab
over numrows. The existing numrows = 500 was therefore dead for the only two
tables this demo feeds: nothing was written intraday, because trade needs
~85 minutes at the feed's rate to reach 50000 rows.

Verified against main (wdb 0.3.0): quote now flushes at 563 and 540 rows, two
saves, 1103 rows on disk in wdb/<date>/quote enumerated against the hdb sym file.

wdb.md documents `numtab = {}` to restore 0.2.0 behaviour, but di.util.toml
has no inline-table support and throws on it, so this uses a [numtab] section
with the demo's own thresholds instead.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@DI-Dexter
DI-Dexter requested a review from alowrydi October 14, 2026 05:58
@DI-Dexter
DI-Dexter merged commit 762aebc into main Oct 15, 2026
@alowrydi
alowrydi deleted the wdb-0.3.0 branch October 16, 2026 12:36
alowrydi added a commit that referenced this pull request Oct 16, 2026
…play

deps.toml keeps this branch's pins and adds di.merge. wdb1.toml keeps
this branch's settings and adds main's [numtab] block.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant