Add delayed jobtemp publishing with spill plane support for Thor #155
+138
−1
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.
Adds
@delayJobTempPublishconfiguration option to write Thor jobtemps to the spill plane and defer Dali publishing until workunit transitions, reducing I/O to persistent storage.Changes
Plane Selection (
common/thorhelper/thorwrite.cpp)getDefaultWritePlane()to route jobtemps to spill plane when@delayJobTempPublishis enabledStowing Mechanism (
thorlcr/mfilemanager/thmfilemanager.cpp)StowedJobTempstructure tracking logical name, WUID, and file referencepublish()to stow jobtemps instead of immediate Dali attachment when feature enabledWorkunit Transition Handling
lookup()andpublish()pathscurrentWuidon first operationLookup Path
lookup()to check stowed set before Dali queryConfiguration
When enabled, jobtemps written to spill plane remain unpublished until:
Known Limitations
Original prompt
Task Description:Currently, in Thor jobtemps are typically written to the data plane as determined by getDefaultJobTempPlane. Modify this behavior by adding a configuration option (delayJobTempPublish) that, when enabled, directs Thor to use the spill plane instead of the data plane for jobtemps. This must account for specific behaviors:
• Delayed unpublished logical jobtemps written to the spill plane must not be discarded after the job completes.
• Instead, they should be stowed and preserved for subsequent use if needed.
• When a new job is received, if it corresponds to the same workunit as the previous job:
• Look up jobtemps in the stowed set.
• If a match is found:
• Use the jobtemp.
• Remove it from the stowed set once consumed.
• If no match is found in the stowed set, check if the jobtemp has been published. If so, use the published version.
• If neither option is available, wait on a workunit-specific subscription (e.g., via SDS notifications) and periodically re-check until the jobtemp is ready.
• If the next job received is not associated with the previous workunit, Thor should:
• Publish all stowed jobtemps associated with the previous workunit before starting the new job.
• This ensures no data is lost and smooth transitions between workunits.
Notes: Use the existing unpublished logical spill file mechanisms as a reference for tracking and managing stowed jobtemp files. Implement the changes in a way that integrates seamlessly with Thor’s current file manager and job dependency management.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.