Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
PartitionIteratingOperation should be non blocking #4889
Currently the PartitionIteratingOperation consumes a generic operation thread, while the operations for the partitions are running. This means that the generic threadpool can dry up and this can cause a lot of problems; also problems for important tasks that can't be executed because the threadpool is empty.
See code below for how it can be done. The issue however is that with the current approach it is very easy to check if an operation is still running by looking at the generic threads their operationrunners. But with the non blocking approach this won't work so you need to make the Operation an TraceableOperation. However you don't want to ask the service which is configured for the PartitionIteratingOperation, because that will be the service of its child operations.
Probably best to introduce a PartitionIteratingService where the system can lookup TraceableOperations.