Introduce async fiber-based worker mode for IO-bound jobs#729
Open
seanharmer wants to merge 6 commits intorails:mainfrom
Open
Introduce async fiber-based worker mode for IO-bound jobs#729seanharmer wants to merge 6 commits intorails:mainfrom
seanharmer wants to merge 6 commits intorails:mainfrom
Conversation
Set 'moby' option to false for the Docker-in-Docker feature in the devcontainer configuration as Debian no longer supports it.
Implement validation for worker concurrency settings in the configuration, ensuring that the concurrency model is supported and that fibers are only set when using the fiber model. Update tests to cover new concurrency model behaviors and ensure proper error handling for unsupported configurations until such time as they get implemented.
This commit introduces the ExecutionBackend class to encapsulate execution logic and capacity management. The Pool class now inherits from Worker::ExecutionBackend. Additionally, tests have been added to ensure the correct behavior of available capacity tracking and the execution backend's functionality. A new fiber-aware execution backend will be added in a follow-up commit.
Add support for fiber-based concurrency in the SolidQueue worker by introducing a new FiberPool class. Update the worker and configuration to handle fiber settings, ensuring proper validation and metadata reporting. Modify tests to validate the new functionality and ensure compatibility with existing features. We make no attempt to find the least busy Runner (thread) within a FibrePool yet. Work is simply distributed to the next Runner in sequence.
Implement a test to verify that the FiberPool correctly returns false when in-flight work exceeds the shutdown timeout. This ensures that the pool behaves as expected under concurrent conditions and maintains accurate capacity tracking. We do not try to cancel in-flight jobs. This is the same approach as the existing thread-pool based backend. Solid queue already manages orphaned jobs at the process level.
Author
|
Feel free to ignore and take #728. |
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.
It looks like I worked in this in parallel to #728 by pure chance. I'm pushing this PR purely as a data point for comparison. Feel free to take any pieces you think to be desirable and ignore the rest.
What changed?
to specify the number of fibers per thread per worker process.