Repository navigation
Fix .save.postreplay default in dbwriteutils.q - #786
Merged
Merged
Conversation
jonathonmcmurray
approved these changes
Nov 27, 2026
jaen15marcos
added a commit
to jaen15marcos/TorQ
that referenced
this pull request
Dec 1, 2026
dbwriteutils.q: .save.postreplay's default is master's line again. DataIntellectTech#786 fixed the same default on master with {{[d;p] }}; this branch had {[e] {[d;p] }}, which does the same. Using master's line leaves dbwriteutils.q unchanged by this branch. rdb.q: restoretimeout restores the timeout only where timeoutreset has saved one. timeoutreset runs from a timer one minute before the scheduled roll, so an end of day which that timer did not prepare (one forced on the tickerplant) stopped the RDB's reload on an undefined .rdb.timeout, and the RDB kept the day's rows. tests/schemas/run.sh: the suite stops its processes and starts them again straight away, and torq.sh start skips a process that is still running. A tickerplant that took a moment to exit was therefore missing for the second half of the suite, and its five tickerplant checks failed. run.sh now waits, ten seconds at most, until the processes have stopped.
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.
Problem
The default for
.save.postreplayis set with@[value;postreplay;{[d;p] }]. If no hook is configured,valuefails and q passes the error message to the handler. The handler takes two arguments (dandp) but is only given one, so q returns a half-applied function instead of the no operation fucntion we want.After EOD, calling
.save.postreplay[d;p]on that half-applied function fails with'rank.Fix
Wrap the handler in a second pair of braces:
{{[d;p] }}. The outer braces take the error message and ignore it. The inner function is returned as the default.rdb.q,wdb.qandtickerlogreplay.qalready do it this way.Testing
Started wdb1 in debug mode with no postreplay hook configured.
Before:
type .save.postreplay->104h.save.postreplay[:.;2026.01.01]->'rank`{[d;p] }["postreplay"]After:
type .save.postreplay->100h.save.postreplay[:.;2026.01.01]` -> no error{[d;p] }Notes
Only the default changes. A user-defined
.save.postreplayset before the file loads is still kept.