Fix race test: parallel tasks must use separate output directories to detect divergence#1233
Fix race test: parallel tasks must use separate output directories to detect divergence#1233Copilot wants to merge 17 commits into
Conversation
Agent-Logs-Url: https://github.com/quickfix-j/quickfixj/sessions/3cc2ab86-f818-4d6f-8294-e0d1805a7497 Co-authored-by: chrjohn <6644028+chrjohn@users.noreply.github.com>
|
@copilot please add logging output how many parallel tasks are used |
Agent-Logs-Url: https://github.com/quickfix-j/quickfixj/sessions/35104349-ab05-422d-861f-1bd35f967d72 Co-authored-by: chrjohn <6644028+chrjohn@users.noreply.github.com>
Implemented in commit |
|
@copilot make generator.parallelExecution true by default. |
Agent-Logs-Url: https://github.com/quickfix-j/quickfixj/sessions/3e8c2bde-9960-418c-9e64-f8f4d450726f Co-authored-by: chrjohn <6644028+chrjohn@users.noreply.github.com>
Done in commit |
|
@copilot parallel execution might work when calling main() of the code generator. However, it does not work when using the GenerateMojo. So the mojo needs the information for all possible executions for the various fix versions at once. Currently there are several executions in quickfixj-messages/quickfixj-messages-all/pom.xml |
Agent-Logs-Url: https://github.com/quickfix-j/quickfixj/sessions/ae17ca4b-feff-443e-a2d8-ade9e02e1fc9 Co-authored-by: chrjohn <6644028+chrjohn@users.noreply.github.com>
Implemented in commit |
|
@copilot looking good so far.
|
Agent-Logs-Url: https://github.com/quickfix-j/quickfixj/sessions/1dcb0259-f870-44c3-9304-d4eb7980b33b Co-authored-by: chrjohn <6644028+chrjohn@users.noreply.github.com>
Implemented in commit |
|
@copilot the test ParallelExecutionOptionTest.testParallelExecutionIsEnabledByDefault is flaky. It expects that the tasks always finish in the same order. Keep the assertions that verify:
|
Agent-Logs-Url: https://github.com/quickfix-j/quickfixj/sessions/58f57ec9-970d-4117-8c1f-67f4377c307c Co-authored-by: chrjohn <6644028+chrjohn@users.noreply.github.com>
Implemented in commit |
@copilot please change MessageCodeGenerator so that number of parallel threads can be optionally specified and use 16 parallel tasks in |
Agent-Logs-Url: https://github.com/quickfix-j/quickfixj/sessions/d36323a4-9bbd-4af6-b90a-3a610f390115 Co-authored-by: chrjohn <6644028+chrjohn@users.noreply.github.com>
... Implemented in commit |
|
@copilot |
Agent-Logs-Url: https://github.com/quickfix-j/quickfixj/sessions/5e22437f-c919-41cc-bd7b-3e321fd6465e Co-authored-by: chrjohn <6644028+chrjohn@users.noreply.github.com>
Implemented in commit |
|
@copilot please change the CI build script so that it parses the output on compilation error and does a simple "cat" on the reported file(s). E.g. the build output is like this: Then do a "cat" on the reported files into the build log. |
... Implemented in commit |
testParallelFieldGenerationMatchesSingleThreadedGoldencould never fail: all 16 parallel tasks shared the same dictionary and the same output directory, so every writer produced byte-for-byte identical content. A file-write race is undetectable when all writers write the same bytes — the result is always correct regardless of interleaving.Changes
createParallelTasks: each task now receives its own output subdirectory (task-0/,task-1/, …) instead of a shared root.testDeterministicCorruptionWithTwoConcurrentWritersis unchanged — it intentionally forces byte-level interleaving viaCoordinatedOutputMessageCodeGeneratorto prove that concurrent writes can corrupt a shared file, and always passing is its correct behaviour.