JiT test suite#2185
Open
rafal-hawrylak wants to merge 8 commits into
Open
Conversation
cb45fc7 to
05001ea
Compare
30d827f to
82ea7e1
Compare
ce6d2cd to
d7b67c9
Compare
c61b97b to
27ac555
Compare
80c6e77 to
ad676e3
Compare
Collaborator
|
/gcbrun |
c38c043 to
e417060
Compare
d360c39 to
c4a4012
Compare
- base_worker: drop redundant undefined guard around clearTimeout
(clearTimeout(undefined) is a documented no-op). Restore
runWorker's timeoutMillis to a required number and drop the
conditional setTimeout — matches main's contract; the earlier
loosening to number|undefined let JiT workers run without any
timeout when --jit-timeout was omitted.
- jit/compiler.ts: default timeoutMillis to
DEFAULT_COMPILATION_TIMEOUT_MILLIS at the .compile() entry point
(mirrors CompileChildProcess.compile), so JiT workers always
have a timeout even without --jit-timeout.
- build.ts: replace unsafe (action as any).jitCode cast with a
narrowing "jitCode" in action check.
- run.ts: flatten the outer try/catch that only wrapped the JiT-compile
try; the JiT-compile block already has its own try/catch. Extract the
action.tableType -> dataform.TableType mapping into tableTypeEnum.
- constants.ts: revert DEFAULT_COMPILATION_TIMEOUT_MILLIS to 60000
(main's value); the per-JiT timeout is configurable via
--jit-timeout.
- compiler.ts: keep the Array.from(response) conversion (child.send
uses JSON IPC by default, which serializes Uint8Array as
{"0":n,...} and Buffer.from() rejects that) but add a comment
documenting the constraint.
c4a4012 to
c57856e
Compare
Each JiT compile registered a cancel handler on the Runner's EventEmitter but never removed it once the compile finished. A run with N JiT actions therefore accumulated N stale listeners and eventually tripped the default MaxListenersExceededWarning threshold. Register the handler through a local variable and remove it in a finally block so successful and failed compiles both clean up. Also drops a stray trailing-whitespace line from the dryRun compiledSql branch (comment #2).
Runs 4 JiT actions and asserts the CANCEL_EVENT listener count returns to zero after the run completes. Fails today (leaks 4 listeners) — will pass once run.ts unregisters each per-compile cancel handler.
c57856e to
3bc372a
Compare
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.
Part of #2110 - [Integrate JiT compilation into CLI]