Repository navigation
Feature clienttrackingv2 - #140
Merged
Merged
Conversation
Replaces the 0.1.0 redesign with a one-to-one repackaging of
code/handlers/trackclients.q, built only from TorQ. The .clients
section is TorQ's text; the only change is .proc.cp[] -> .z.p.
Surface: root .clients.* (clients keyed on w with all 17 columns,
cleanup, hit, hite, po, addw, pc, wo, unregistered), .dotz.ipa and
.dotz.liveh/livehn/liveh0. Exports init and version.
Deviations:
- .z.po/.z.pc/.z.wo/.z.wc go through di.torq.handlers observers, so
the existing handler runs after tracking instead of before.
- .z.pg/.z.ps/.z.ws are wrapped directly in init, as di.querylog does,
with {.clients.hit[@[x;y;.clients.hite]]}. Unset handlers default to
dotz.q's value/value/echo. init is once only, and a later
di.torq.handlers exec owner replaces the wrap.
- .proc.cp[] -> .z.p.
- Settings come from a clients config section with TorQ's names,
set onto .clients.<name>. Defaults (default.q:31-37) live in the
module until it is wired into di.torq.
- .dotz.IPA/ipa/liveh/livehn/liveh0 come from dotz.q:6-8, defined at
load in a \d .dotz section only if absent.
- Not yet loaded by di.torq. apidetails.q's .api.add not ported.
- Descriptive comments and the commented-out timer block dropped.
Kept as TorQ has them:
- .z.pc is wired even when disabled.
- AUTOCLEAN is never read.
- unregistered reads a nonexistent CLIENTS table.
- Closed rows share a null key.
- Async and websocket results count toward sz.
- Idle-reaped rows are dropped in the same sweep, because their endp
is still null.
- hits and errs are ints.
Tests: 41, against four real server peers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
init now wraps .z.* in order: clienttracking, querylog, zpsignore. zpsignore runs ignorelisted async messages (upd, .u.upd) with value, so ticks skip client tracking. Tickerplant and segmentedtp settings track connections only and turn zpsignore off. The di.torq suite gains rows for client counting, the upd bypass, string messages not being skipped, zpsignore off, and the tickerplant settings; they fail on the previous torq.q. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DIReview Summary2 critical | 3 warning(s) | 1 suggestion(s)
Suggestions
|
DI-Dexter
reviewed
Oct 1, 2026
| / test helpers: server peers running di.clienttracking under different settings | ||
|
|
||
| FIXDIR:"/tmp/dictracktest" | ||
| QBIN:first system "readlink -f /proc/",(string .z.i),"/exe" |
Collaborator
There was a problem hiding this comment.
minor but maybe this can be standardised as well
Collaborator
Author
There was a problem hiding this comment.
This already uses the standard form shared by every test (readlink -f /proc//exe). The only fixture that differed was servers' spawnpeer, now fixed in 138.
DI-Dexter
approved these changes
Oct 2, 2026
DI-Dexter
previously approved these changes
Oct 2, 2026
DIReview Summary1 critical | 4 warning(s) | 3 suggestion(s)
Suggestions
|
DI-Dexter
approved these changes
Oct 2, 2026
alowrydi
added a commit
that referenced
this pull request
Oct 2, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rebuilds di.clienttracking (0.1.0 → 0.2.0) from scratch as a faithful port of TorQ's trackclients.q - the prior version was a redesign (renamed/dropped columns, added validation and gating never present in legacy), not a port.
Wires it into di.torq for the first time: every process now calls clienttracking.init unconditionally, matching legacy's own order.txt behaviour. Adds zpsignore directly in torq.q's own init (not a separate module - it has no standalone purpose) so tick traffic (upd/.u.upd) is correctly excluded from both client-tracking hit counts and query logging, as legacy does. Builtin tickerplant/segmentedtp settings gain opencloseonly:1b and zpsignore.enabled:0b, matching legacy's own pairing for tickerplants.